Merge pull request #1060 from pateljannat/issues-43
fix: redirect to login before enrollment
This commit is contained in:
@@ -124,6 +124,9 @@ const enroll = createResource({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const enrollInBatch = () => {
|
const enrollInBatch = () => {
|
||||||
|
if (!user.data) {
|
||||||
|
window.location.href = `/login?redirect-to=/batches/details/${props.batch.data.name}`
|
||||||
|
}
|
||||||
enroll.submit(
|
enroll.submit(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user