first commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import type { Metadata } from 'next'
|
||||
import { NextIntlClientProvider } from 'next-intl'
|
||||
import { getMessages } from 'next-intl/server'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { routing } from '@/i18n/routing'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Vesta Muğla | Evinizde Doğa, Doğada Huzur',
|
||||
description:
|
||||
"Muğla'nın doğal güzellikleri içinde yer alan lüks rezidans projesi. Modern tasarımlar, sosyal alanlar ve doğayla iç içe huzurlu bir yaşam.",
|
||||
openGraph: {
|
||||
title: 'Vesta Muğla',
|
||||
description: "Muğla'nın orman içinde lüks konut projesi",
|
||||
images: ['https://images.unsplash.com/photo-1580587771525-78b9dba3b914?w=1200&q=80'],
|
||||
},
|
||||
}
|
||||
|
||||
export function generateStaticParams() {
|
||||
return routing.locales.map((locale) => ({ locale }))
|
||||
}
|
||||
|
||||
export default async function LocaleLayout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
|
||||
if (!routing.locales.includes(locale as 'tr' | 'en')) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
const messages = await getMessages()
|
||||
|
||||
return (
|
||||
<NextIntlClientProvider messages={messages}>
|
||||
{children}
|
||||
</NextIntlClientProvider>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user