Merge pull request #1060 from pateljannat/issues-43

fix: redirect to login before enrollment
This commit is contained in:
Jannat Patel
2024-10-11 22:33:52 +05:30
committed by GitHub

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(
{},
{