import type { Locale } from '@/lib/locale'; import { formatStatus, formatCreatedAt, getStatusBadgeClass, getPaymentDisplayInfo, type MyOrder, } from '@/lib/pay-utils'; interface OrderTableProps { isDark: boolean; locale: Locale; loading: boolean; error: string; orders: MyOrder[]; } export default function OrderTable({ isDark, locale, loading, error, orders }: OrderTableProps) { const text = locale === 'en' ? { empty: 'No matching orders found', orderId: 'Order ID', amount: 'Amount', payment: 'Payment Method', status: 'Status', createdAt: 'Created At', } : { empty: '暂无符合条件的订单记录', orderId: '订单号', amount: '金额', payment: '支付方式', status: '状态', createdAt: '创建时间', }; return (