Refactor
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
import { useState, useEffect, ChangeEvent } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import Layout from "@/components/kokonutui/layout";
|
||||
import Layout from "@/components/layout/layout";
|
||||
import { Edit, Plus, Trash } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { ShippingModal } from "@/components/shipping-modal";
|
||||
import { ShippingModal } from "@/components/modals/shipping-modal";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import {
|
||||
fetchShippingMethods,
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
|
||||
import { ShippingMethod, ShippingData } from "@/lib/types";
|
||||
|
||||
import { ShippingTable } from "@/components/shipping-table";
|
||||
import { ShippingTable } from "@/components/tables/shipping-table";
|
||||
|
||||
export default function ShippingPage() {
|
||||
const [shippingMethods, setShippingMethods] = useState<ShippingMethod[]>([]);
|
||||
@@ -54,6 +54,8 @@ export default function ShippingPage() {
|
||||
})
|
||||
);
|
||||
|
||||
console.log("Fetched Shipping Methods:", sanitizedMethods);
|
||||
|
||||
setShippingMethods(sanitizedMethods);
|
||||
} catch (error) {
|
||||
console.error("Error loading shipping options:", error);
|
||||
|
||||
Reference in New Issue
Block a user