Add settings layout and page structure for authenticated routes
Introduce tabbed navigation for the settings page, including Profile, Password, Sessions, and Preferences sections. Add placeholders for each section with metadata and routes. Redirect `/settings` to `/settings/profile`. Integrate `AuthGuard` for settings and authenticated layouts while incorporating reusable `Header` and `Footer` components.
This commit is contained in:
34
frontend/src/app/(authenticated)/layout.tsx
Normal file
34
frontend/src/app/(authenticated)/layout.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Authenticated Route Group Layout
|
||||
* Wraps all authenticated routes with AuthGuard and provides common layout structure
|
||||
*/
|
||||
|
||||
import type { Metadata } from 'next';
|
||||
import { AuthGuard } from '@/components/auth';
|
||||
import { Header } from '@/components/layout/Header';
|
||||
import { Footer } from '@/components/layout/Footer';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
template: '%s | FastNext Template',
|
||||
default: 'Dashboard',
|
||||
},
|
||||
};
|
||||
|
||||
export default function AuthenticatedLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<AuthGuard>
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<Header />
|
||||
<main className="flex-1">
|
||||
{children}
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
</AuthGuard>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user