login logout redirects, session, remove out of scope code

This commit is contained in:
Timur Ercan
2023-01-04 14:37:33 +01:00
parent dd36e8d161
commit fe2219dcd2
6 changed files with 24 additions and 174 deletions

View File

@ -27,10 +27,10 @@ const userNavigation = [
{ name: "Your Profile", href: "/settings" },
{
name: "Sign out",
href: "/login",
href: "",
click: (e: any) => {
e.preventDefault();
signOut();
signOut({ callbackUrl: "/login" });
},
},
];
@ -41,7 +41,6 @@ function classNames(...classes: any) {
export default function Layout({ children }: any) {
const router = useRouter();
navigation.forEach((element) => {
element.current = element.href == router.route;
});