This commit is contained in:
g
2025-02-07 05:22:21 +00:00
parent f19797e752
commit 3205bb1a6b
11 changed files with 1021 additions and 432 deletions

View File

@@ -1,13 +1,16 @@
import { Skeleton } from "@/components/ui/skeleton";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { Button } from "@/components/ui/button";
import { Edit, Trash } from "lucide-react";
interface ShippingMethod {
_id: string;
name: string;
price: number;
}
import { ShippingMethod } from "@/lib/types";
interface ShippingTableProps {
shippingMethods: ShippingMethod[];
@@ -46,9 +49,7 @@ export const ShippingTable: React.FC<ShippingTableProps> = ({
className="transition-colors hover:bg-gray-50 dark:hover:bg-zinc-800/70"
>
<TableCell className="font-medium">{method.name}</TableCell>
<TableCell className="text-center">
£{method.price}
</TableCell>
<TableCell className="text-center">£{method.price}</TableCell>
<TableCell className="text-right">
<div className="flex justify-end">
<Button
@@ -63,7 +64,7 @@ export const ShippingTable: React.FC<ShippingTableProps> = ({
size="sm"
variant="ghost"
className="text-red-600 hover:text-red-700 dark:text-red-400"
onClick={() => onDeleteShipping(method._id)}
onClick={() => onDeleteShipping(method._id ?? "")}
>
<Trash className="h-4 w-4" />
</Button>