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.
35 lines
766 B
TypeScript
35 lines
766 B
TypeScript
/**
|
|
* 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>
|
|
);
|
|
}
|