diff --git a/app/(root)/adt/[id]/page.tsx b/app/(root)/adt/[id]/page.tsx new file mode 100644 index 0000000..45e6968 --- /dev/null +++ b/app/(root)/adt/[id]/page.tsx @@ -0,0 +1,109 @@ +import React from 'react'; +// import { useParams } from 'next/navigation'; +import { MapPin, Calendar, Phone, MessageCircle, Share2, Flag, Heart } from 'lucide-react'; +import { adts } from '@/data/adt'; +import { prisma } from '@/prisma/prisma-client'; +import Header from '@/components/Header'; +import { notFound } from 'next/navigation'; + +export default async function AdtPage({params: { id } }: { params: { id: string } }) { + const adt = await prisma.adt.findUnique({ + where: { + id: Number(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 всплывающее окно для показа номера */} + + + + +
+
+
+
+
+ + ); +} \ No newline at end of file diff --git a/app/(root)/adt/create/page.tsx b/app/(root)/adt/create/page.tsx new file mode 100644 index 0000000..80352b8 --- /dev/null +++ b/app/(root)/adt/create/page.tsx @@ -0,0 +1,105 @@ +import React from 'react'; +import { ImagePlus, X } from 'lucide-react'; + +export default function CreateListing() { + return ( +
+
+

Create New Listing

+ +
+
+ + +
+ +
+ + +
+ +
+ +
+ $ + +
+
+ +
+ +