x
This commit is contained in:
1 parent
78f2cb62aa
commit
aefa13e363
6 files changed
+209
-17
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import type { Metadata } from 'next'
|
||||
import { notFound } from 'next/navigation'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Page Not Found | HomAroma',
|
||||
}
|
||||
|
||||
export default function NestedLocaleNotFound() {
|
||||
notFound()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { headers } from 'next/headers'
|
||||
import LocalizedNotFound from '@/components/LocalizedNotFound'
|
||||
import { DEFAULT_LOCALE, isSupportedLocale } from '@/lib/locales'
|
||||
|
||||
export default async function NotFound() {
|
||||
const requestHeaders = await headers()
|
||||
const headerLocale = requestHeaders.get('x-homaroma-locale') ?? DEFAULT_LOCALE
|
||||
const lang = isSupportedLocale(headerLocale) ? headerLocale : DEFAULT_LOCALE
|
||||
|
||||
return <LocalizedNotFound lang={lang} />
|
||||
}
|
||||
Reference in new issue
Block a user