feat(ui): yacht detail page with header, tabs, ownership history
Implements Task 5.3: server page passes yachtId to a client YachtDetail, which fetches via TanStack Query and renders the shared DetailLayout with Overview / Ownership History / Interests / Reservations / Notes / Tags tabs. Header shows name, dimensions, polymorphic owner link, status badge, and Edit / Transfer / Archive actions. Transfer is a stub dialog pending Task 5.5; Notes tab is a placeholder because NotesList does not yet support entityType='yachts'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
16
src/app/(dashboard)/[portSlug]/yachts/[yachtId]/page.tsx
Normal file
16
src/app/(dashboard)/[portSlug]/yachts/[yachtId]/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { YachtDetail } from '@/components/yachts/yacht-detail';
|
||||
import { auth } from '@/lib/auth';
|
||||
import { headers } from 'next/headers';
|
||||
|
||||
interface YachtDetailPageProps {
|
||||
params: Promise<{ yachtId: string }>;
|
||||
}
|
||||
|
||||
export default async function YachtDetailPage({ params }: YachtDetailPageProps) {
|
||||
const { yachtId } = await params;
|
||||
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
const currentUserId = session?.user?.id;
|
||||
|
||||
return <YachtDetail yachtId={yachtId} currentUserId={currentUserId} />;
|
||||
}
|
||||
Reference in New Issue
Block a user