diff --git a/src/app/[locale]/dashboard/page.tsx b/src/app/[locale]/dashboard/page.tsx new file mode 100644 index 0000000..f0f75b2 --- /dev/null +++ b/src/app/[locale]/dashboard/page.tsx @@ -0,0 +1,43 @@ +import Link from 'next/link'; +import { getTranslations } from 'next-intl/server'; +import { redirect } from 'next/navigation'; + +import { Button } from '@/components/ui/button'; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from '@/components/ui/card'; +import { isAuthenticated } from '@/lib/auth-server'; +import { routes } from '@/lib/routes'; + +export default async function DashboardPage() { + const authenticated = await isAuthenticated(); + + if (!authenticated) { + const searchParams = new URLSearchParams({ + callbackURL: routes.private.dashboard, + }); + redirect(`${routes.public.signIn}?${searchParams.toString()}`); + } + + const t = await getTranslations('DashboardPage'); + + return ( +
+ + + {t('SecurityCardTitle')} + {t('SecurityCardDescription')} + + + + + +
+ ); +} diff --git a/src/app/[locale]/settings/page.tsx b/src/app/[locale]/settings/page.tsx new file mode 100644 index 0000000..95bce32 --- /dev/null +++ b/src/app/[locale]/settings/page.tsx @@ -0,0 +1,23 @@ +import { redirect } from 'next/navigation'; + +import { PasswordChangeCard } from '@/components/settings/PasswordChangeCard'; +import { isAuthenticated } from '@/lib/auth-server'; +import { routes } from '@/lib/routes'; + +export default async function SettingsPage() { + const authenticated = await isAuthenticated(); + + if (!authenticated) { + const searchParams = new URLSearchParams({ + callbackURL: routes.private.settings, + }); + + redirect(`${routes.public.signIn}?${searchParams.toString()}`); + } + + return ( +
+ +
+ ); +}