import { Skeleton } from "@/components/ui/skeleton"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import { Button } from "@/components/ui/button"; import { Edit, Trash } from "lucide-react"; import { ShippingMethod } from "@/lib/types"; interface ShippingTableProps { shippingMethods: ShippingMethod[]; loading: boolean; onEditShipping: (method: ShippingMethod) => void; onDeleteShipping: (_id: string) => void; } export const ShippingTable: React.FC = ({ shippingMethods, loading, onEditShipping, onDeleteShipping, }) => { return (
Name Price Actions {loading ? ( ) : shippingMethods.length > 0 ? ( shippingMethods.map((method) => ( {method.name} £{method.price}
)) ) : ( No shipping methods found )}
); };