fb
This commit is contained in:
20
app/[lang]/news/[slug]/page.tsx
Normal file
20
app/[lang]/news/[slug]/page.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { getDictionary } from "@/dictionaries/get-dictionary"
|
||||
import NewsDetailClient from "./NewsDetailClient"
|
||||
|
||||
export async function generateMetadata({ params }: { params: Promise<{ lang: string, slug: string }> }) {
|
||||
const { lang, slug } = await params
|
||||
const dict = await getDictionary(lang as 'en' | 'tr')
|
||||
|
||||
// Dynamic title based on slug if possible, or just section title
|
||||
return {
|
||||
title: `News - Ayris Apart`,
|
||||
description: dict.news_page.subtitle,
|
||||
}
|
||||
}
|
||||
|
||||
export default async function NewsDetailPage({ params }: { params: Promise<{ lang: string, slug: string }> }) {
|
||||
const { lang, slug } = await params
|
||||
const dict = await getDictionary(lang as 'en' | 'tr')
|
||||
|
||||
return <NewsDetailClient lang={lang} slug={slug} dict={dict} />
|
||||
}
|
||||
Reference in New Issue
Block a user