'use client' import { useRouter } from 'next/navigation' import { isSome } from '@solana/kit' import { useListing } from '@/hooks/useListing' import { useOrdersForListing } from '@/hooks/useOrdersForListing' import { Badge, STATUS_COLORS } from '@/components/ui/Badge' import { FieldRow, MonoChip } from '@/components/ui/FieldRow' import { Button } from '@/components/ui/Button' import { abbrev, fmtSol, fmtTok, priceStr } from '@/lib/format' import type { Address } from '@solisting/sdk' interface Props { pk: Address walletAddress?: string | null onUpdate?: () => void onClose?: () => void onPlaceOrder?: () => void } export function ListingDetail({ pk, walletAddress, onUpdate, onClose, onPlaceOrder }: Props) { const router = useRouter() const { data: listing, isLoading, error } = useListing(pk) const { data: orders = [] } = useOrdersForListing(pk) if (isLoading) return
{d.description || ( {d.metadataUri} )}
)}