chore: clean up scratch files and apply remaining updates
This commit is contained in:
@@ -3,19 +3,30 @@ import { Link } from '@/i18n/routing'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { ArrowLeft, Layers } from 'lucide-react'
|
||||
import ListingCard from '@/components/ListingCard'
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
interface Props {
|
||||
params: Promise<{ locale: string; slug: string }>
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: Props) {
|
||||
const { slug } = await params
|
||||
export async function generateMetadata({ params }: Props): Promise<Metadata> {
|
||||
const { locale, slug } = await params
|
||||
const col = await mockDb.getCollectionBySlug(slug)
|
||||
if (!col) return {}
|
||||
|
||||
|
||||
const title = locale === 'en' ? col.titleEn : locale === 'ru' ? col.titleRu : col.titleTr
|
||||
const description = locale === 'en' ? col.descriptionEn : locale === 'ru' ? col.descriptionRu : col.descriptionTr
|
||||
const fullTitle = `${title} — Marmaris Local`
|
||||
|
||||
return {
|
||||
title: `${col.titleTr} Seçkisi — Marmaris Local`,
|
||||
description: col.descriptionTr
|
||||
title: fullTitle,
|
||||
description,
|
||||
openGraph: {
|
||||
title: fullTitle,
|
||||
description,
|
||||
type: 'website',
|
||||
...(col.coverImage ? { images: [{ url: col.coverImage }] } : {}),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user