changed toast timer, redirect behavior in disptach, VehicleNames
This commit is contained in:
@@ -8,7 +8,11 @@ export default () => {
|
||||
const session = useSession();
|
||||
|
||||
useEffect(() => {
|
||||
if (session.status === "authenticated" && session.data?.user) {
|
||||
if (session.status !== "authenticated") {
|
||||
router.replace("/login");
|
||||
return;
|
||||
}
|
||||
if (session.data?.user) {
|
||||
const hasDispoPermission = session.data.user.permissions?.includes("DISPO");
|
||||
|
||||
if (hasDispoPermission) {
|
||||
|
||||
Reference in New Issue
Block a user