33 lines
872 B
TypeScript
33 lines
872 B
TypeScript
import { getTranslations, setRequestLocale } from 'next-intl/server'
|
|
import { MOCK_CATEGORIES, MOCK_TOURS, MOCK_REVIEWS } from '@/lib/mock'
|
|
import { HomePageClient } from './HomePageClient'
|
|
|
|
export default async function HomePage({ params }: { params: Promise<{ locale: string }> }) {
|
|
const { locale } = await params
|
|
setRequestLocale(locale)
|
|
|
|
const h = await getTranslations('hero')
|
|
const s = await getTranslations('sections')
|
|
const t = await getTranslations('tour')
|
|
|
|
const dict = {
|
|
hTitle: h('title'),
|
|
hSubtitle: h('subtitle'),
|
|
hCta: h('cta'),
|
|
sPopular: s('popular'),
|
|
sViewAll: s('view_all'),
|
|
sCategories: s('categories'),
|
|
sReviews: s('reviews'),
|
|
tFrom: t('from')
|
|
}
|
|
|
|
return (
|
|
<HomePageClient
|
|
dict={dict}
|
|
tours={MOCK_TOURS}
|
|
categories={MOCK_CATEGORIES}
|
|
reviews={MOCK_REVIEWS}
|
|
/>
|
|
)
|
|
}
|