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