Files
ayrisapart/app/[lang]/blog/page.tsx
T
ayrisdevandClaude Sonnet 4.6 40b4434a7b 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>
2026-06-02 18:05:30 +03:00

31 lines
893 B
TypeScript

import { getDictionary } from "@/dictionaries/get-dictionary"
import NewsClient from "./NewsClient"
import { prisma } from "@/lib/prisma"
export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }) {
const { lang } = await params
const dict = await getDictionary(lang as 'en' | 'tr')
return {
title: `${dict.news_page.title} - Ayris Apart`,
description: dict.news_page.excerpt,
}
}
export default async function NewsPage({ params }: { params: Promise<{ lang: string }> }) {
const { lang } = await params
const dict = await getDictionary(lang as 'en' | 'tr')
// Fetch posts from database based on the selected language
const posts = await prisma.post.findMany({
where: {
lang: lang,
published: true
},
orderBy: {
createdAt: 'desc'
}
})
return <NewsClient lang={lang} dict={dict} posts={posts} />
}