Added Logout Option and prefetch for the dashboard
This commit is contained in:
@@ -20,14 +20,11 @@ const Layout = ({ children }) => {
|
||||
|
||||
useEffect(() => {
|
||||
const authenticationPages = [
|
||||
// "/",
|
||||
"/auth",
|
||||
"/auth/login",
|
||||
"/auth/sign-up",
|
||||
"/auth/forgot-password",
|
||||
"/auth/lock-screen",
|
||||
"/auth/confirm-mail",
|
||||
"/auth/logout",
|
||||
];
|
||||
|
||||
setIsAuthenticationPage(authenticationPages.includes(router.pathname));
|
||||
@@ -38,8 +35,8 @@ const Layout = ({ children }) => {
|
||||
|
||||
const title = isAuthenticationPage ? "CMC - auth" : "CMC - dashboard";
|
||||
const mainWrapper = {
|
||||
paddingLeft: typeof window !== "undefined" && isAuthenticationPage && "0"
|
||||
}
|
||||
paddingLeft: typeof window !== "undefined" && isAuthenticationPage && "0",
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -65,7 +62,9 @@ const Layout = ({ children }) => {
|
||||
{children}
|
||||
</div>
|
||||
|
||||
{!isAuthenticationPage && <Footer />}
|
||||
{!isAuthenticationPage && router.pathname !== "/auth/logout" && (
|
||||
<Footer />
|
||||
)}
|
||||
</div>
|
||||
|
||||
<ScrollToTop />
|
||||
|
||||
Reference in New Issue
Block a user