import { Suspense } from "react";

import { Skeleton } from "@/components/ui/skeleton";
import { TicketOrdersListScreen } from "@/features/orders/ticket-orders-list-screen";

function OrdersFallback() {
  return (
    <div className="space-y-3">
      {Array.from({ length: 5 }).map((_, i) => (
        <Skeleton key={i} className="h-24 w-full rounded-lg" />
      ))}
    </div>
  );
}

/** 界面文档 §4.7 我的注单（支持 `?draw_no=` 筛选） */
export default function OrdersPage() {
  return (
    <Suspense fallback={<OrdersFallback />}>
      <TicketOrdersListScreen />
    </Suspense>
  );
}
