completionId: cgen-1f2b5796113a4713a2f445b1595f6acf
cgen-1f2b5796113a4713a2f445b1595f6acf
This commit is contained in:
parent
a3c1b52448
commit
925e2e8a04
1 changed files with 3 additions and 3 deletions
|
|
@ -84,11 +84,11 @@ export default function StaffLogin() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid staff email - redirect to dashboard
|
// Valid staff email - redirect to admin dashboard
|
||||||
const params = new URLSearchParams(location.search);
|
const params = new URLSearchParams(location.search);
|
||||||
const next = params.get("next");
|
const next = params.get("next");
|
||||||
const safeNext = next && next.startsWith("/staff") ? next : null;
|
const safeNext = next && next.startsWith("/admin") ? next : null;
|
||||||
navigate(safeNext || "/staff/dashboard", { replace: true });
|
navigate(safeNext || "/admin", { replace: true });
|
||||||
}
|
}
|
||||||
}, [user, loading, navigate, location.search, toastError]);
|
}, [user, loading, navigate, location.search, toastError]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue