Add locale-prefixed routes for admin, auth, dashboard, and public pages. Add error, loading, and not-found pages for locale context. Add language switcher UI component for Vietnamese/English toggle. Co-Authored-By: Paperclip <noreply@paperclip.ing>
35 lines
1.5 KiB
TypeScript
35 lines
1.5 KiB
TypeScript
import { useTranslations } from 'next-intl';
|
|
import { Link } from '@/i18n/navigation';
|
|
|
|
export default function NotFound() {
|
|
const t = useTranslations();
|
|
|
|
return (
|
|
<div className="flex min-h-screen flex-col items-center justify-center bg-background px-4">
|
|
<div className="mx-auto max-w-md text-center">
|
|
<div className="text-8xl font-bold text-primary/20" aria-hidden="true">404</div>
|
|
<h1 className="mt-4 text-2xl font-bold tracking-tight">
|
|
{t('notFound.title')}
|
|
</h1>
|
|
<p className="mt-2 text-muted-foreground">
|
|
{t('notFound.description')}
|
|
</p>
|
|
<div className="mt-8 flex justify-center gap-3">
|
|
<Link
|
|
href="/"
|
|
className="inline-flex h-10 items-center justify-center rounded-md bg-primary px-6 text-sm font-medium text-primary-foreground shadow transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
>
|
|
{t('common.goHome')}
|
|
</Link>
|
|
<Link
|
|
href="/search"
|
|
className="inline-flex h-10 items-center justify-center rounded-md border border-input bg-background px-6 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
>
|
|
{t('common.search')}
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|