mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-04 04:30:06 +00:00
fix: logout & login page home button
This commit is contained in:
@@ -55,7 +55,7 @@ export default function Header() {
|
|||||||
<NavigationMenuList>
|
<NavigationMenuList>
|
||||||
<Card className="mr-1">
|
<Card className="mr-1">
|
||||||
<NavigationMenuLink asChild className={navigationMenuTriggerStyle() + ' !text-foreground'}>
|
<NavigationMenuLink asChild className={navigationMenuTriggerStyle() + ' !text-foreground'}>
|
||||||
<Link to="/dashboard"><img className="h-7 mr-1" src='/dashboard/logo.svg' /> NEZHA</Link>
|
<Link to={profile ? "/dashboard" : '#'}><img className="h-7 mr-1" src='/dashboard/logo.svg' /> NEZHA</Link>
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export const AuthProvider = ({ children }: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
|
document.cookie.split(";").forEach(function (c) { document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); });
|
||||||
setProfile(undefined);
|
setProfile(undefined);
|
||||||
navigate("/dashboard/login", { replace: true });
|
navigate("/dashboard/login", { replace: true });
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user