import React from 'react'; // import { useParams } from 'next/navigation'; import { MapPin, Calendar, Phone, MessageCircle, Share2, Flag, Heart } from 'lucide-react'; import { prisma } from '@/prisma/prisma-client'; import { notFound } from 'next/navigation'; type Params = Promise<{ id: string }> export default async function AdtPage(props: { params: Params }) { const params = await props.params; const adt = await prisma.adt.findUnique({ where: { id: Number(params.id), }, include: { user: true } }) if (!adt) { return notFound(); } const user = adt.user // const { id } = params(); // const adt = adts.find(l => l.id === id) || adts[0]; return ( <>
{adt.title}

{adt.title}

{adt.price}
{adt.location}
{String(adt.createdAt)}

Description

This is a detailed description of the listing. It includes all the important information about the item, its condition, and any special features or considerations.

Seller

{user?.name}

Member {String(user?.createdAt)}

{/* TODO всплывающее окно для показа номера */}
); }