feat: i18n fixes, blog rename, footer cleanup, and contact info update
- Rename /news route to /blog across all pages, links, and sitemap - Fix hardcoded English text in Experiences, QuoteSection, and Footer by wiring all content through the TR/EN dictionaries - Clean up Footer: remove non-existent page links, add contact column - Update contact info: new phone numbers, bilgi@ email, No:71 address, Instagram @ayrisapart link - Add suppressHydrationWarning to <body> to silence browser-extension attribute mismatch errors - Add sizes prop to all fill-mode Next.js Image components Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { getDictionary } from "@/dictionaries/get-dictionary"
|
||||
import NewsDetailClient from "./NewsDetailClient"
|
||||
import { prisma } from "@/lib/prisma"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
export async function generateMetadata({ params }: { params: Promise<{ lang: string, slug: string }> }) {
|
||||
const { lang, slug } = await params
|
||||
|
||||
const post = await prisma.post.findUnique({
|
||||
where: { slug }
|
||||
})
|
||||
|
||||
if (!post) return { title: 'Post Not Found' }
|
||||
|
||||
return {
|
||||
title: `${post.title} - Ayris Apart`,
|
||||
description: post.excerpt,
|
||||
}
|
||||
}
|
||||
|
||||
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')
|
||||
|
||||
const post = await prisma.post.findUnique({
|
||||
where: { slug }
|
||||
})
|
||||
|
||||
if (!post) notFound()
|
||||
|
||||
return <NewsDetailClient lang={lang} dict={dict} post={post} />
|
||||
}
|
||||
Reference in New Issue
Block a user