'use client'; import Link from 'next/link'; import { useParams } from 'next/navigation'; import { useQuery } from '@tanstack/react-query'; import { PageHeader } from '@/components/shared/page-header'; import { ReservationList, type ReservationRow } from '@/components/reservations/reservation-list'; import { TableSkeleton } from '@/components/shared/loading-skeleton'; import { apiFetch } from '@/lib/api/client'; interface ReservationsApiResponse { data: ReservationRow[]; pagination: { total: number; page: number; pageSize: number }; } export function BerthReservationsList() { const params = useParams<{ portSlug: string }>(); const portSlug = params?.portSlug ?? ''; const { data, isLoading } = useQuery({ queryKey: ['berth-reservations', 'list'], queryFn: () => apiFetch('/api/v1/berth-reservations?page=1&limit=100&order=desc'), }); return (
View berths } /> {isLoading ? ( ) : ( )}
); }