Bu sunumda ilan bulunmuyor.
)}import { notFound } from "next/navigation"; import { Query } from "node-appwrite"; import { DATABASE_ID, TABLES, type Presentation, type Property } from "@/lib/appwrite/schema"; import { createAdminClient } from "@/lib/appwrite/server"; import { incrementPresentationViewCount } from "@/lib/appwrite/presentation-actions"; import { PROPERTY_TYPE_LABELS, LISTING_TYPE_LABELS, PROPERTY_STATUS_LABELS, } from "@/lib/appwrite/schema"; interface Props { params: Promise<{ token: string }>; } export default async function SunumPage({ params }: Props) { const { token } = await params; const { tablesDB } = createAdminClient(); const result = await tablesDB.listRows({ databaseId: DATABASE_ID, tableId: TABLES.presentations, queries: [Query.equal("shareToken", token), Query.limit(1)], }); if (!result.rows.length) notFound(); const presentation = result.rows[0] as unknown as Presentation; if (presentation.expiresAt && new Date(presentation.expiresAt) < new Date()) { return (
Bu sunum artık geçerli değil.
{presentation.notes}
)}{properties.length} ilan
Bu sunumda ilan bulunmuyor.
)}{[p.neighborhood, p.district, p.city].filter(Boolean).join(", ")}
{p.price.toLocaleString("tr-TR")} {p.currency ?? "TRY"}
{p.description && ({p.description}
)}