Added Logout Option and prefetch for the dashboard

This commit is contained in:
2023-10-23 00:45:13 -07:00
parent c3dea8ae95
commit de57daf98a
6 changed files with 95 additions and 85 deletions
-16
View File
@@ -32,17 +32,6 @@ export async function middleware(req, next) {
});
}
// Add authentication logic here (verify the token, etc.)
// const isAuthenticated = verifyToken(token);
// const isAuthenticated = hasCookie("cmc-token", { req });
// if (!isAuthenticated) {
// // Handle unauthenticated users
// return NextResponse.error(new Error("Authentication failed"), {
// status: 401,
// });
// }
} catch (error) {
console.error("Error during authentication check:", error);
return NextResponse.error();
@@ -54,12 +43,7 @@ export const config = {
};
const authenticationPages = [
// "/",
"/auth",
"/auth/login",
"/auth/sign-up",
"/auth/forgot-password",
"/auth/lock-screen",
"/auth/confirm-mail",
"/auth/logout",
];