fix: resolve ts errors for build and cleanup widget partners action

This commit is contained in:
AyrisAI
2026-07-13 14:25:28 +03:00
parent 53cbee0841
commit f37d2b4c39
6 changed files with 37 additions and 176 deletions
@@ -1,36 +0,0 @@
import { getTranslations } from 'next-intl/server'
import { mockDb } from '@/lib/mockDb'
import { notFound } from 'next/navigation'
import WidgetPartnerForm from './WidgetPartnerForm'
export const dynamic = 'force-dynamic'
interface Props {
params: Promise<{ id: string; locale: string }>
}
export default async function EditWidgetPartnerPage({ params }: Props) {
const { id } = await params
const isNew = id === 'new'
let partner = null
if (!isNew) {
partner = (await mockDb.getWidgetPartners()).find(p => p.id === id)
if (!partner) notFound()
}
return (
<div className="max-w-3xl mx-auto py-10 space-y-6">
<div className="flex flex-col gap-1 mb-8">
<h2 className="text-3xl font-heading font-extrabold text-pine lowercase">
{isNew ? 'yeni partner ekle' : 'partneri düzenle'}
</h2>
<p className="text-ink/65 text-xs font-medium">
Widget partneri bilgilerini buradan {isNew ? 'ekleyebilirsiniz' : 'düzenleyebilirsiniz'}.
</p>
</div>
<WidgetPartnerForm initialData={partner} />
</div>
)
}