mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
Ajout zones en pavage + fix dockefiles
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { redirect, usePathname } from "next/navigation";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export function usePasswordProtect(loginPath, redirectPath, loading, loggedIn) {
|
||||
export default function usePasswordProtect(loginPath, redirectPath, loading, loggedIn) {
|
||||
const path = usePathname();
|
||||
useEffect(() => {
|
||||
if (!loggedIn && !loading && path !== loginPath) {
|
||||
@@ -12,4 +12,4 @@ export function usePasswordProtect(loginPath, redirectPath, loading, loggedIn) {
|
||||
redirect(redirectPath)
|
||||
}
|
||||
}, [loggedIn, loading, path]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user