fix: redirect to login before enrollment

This commit is contained in:
Jannat Patel
2024-10-11 22:18:18 +05:30
parent 2d8ba3b84e
commit 1597054cc9

View File

@@ -124,6 +124,9 @@ const enroll = createResource({
})
const enrollInBatch = () => {
if (!user.data) {
window.location.href = `/login?redirect-to=/batches/details/${props.batch.data.name}`
}
enroll.submit(
{},
{