This commit is contained in:
g
2025-02-07 14:09:21 +00:00
parent 717451ac9f
commit 6158f232db
6 changed files with 111 additions and 47 deletions

View File

@@ -1,8 +1,25 @@
"use client";
import { useEffect } from "react";
import { useRouter } from "next/navigation";
import Dashboard from "@/components/kokonutui/dashboard";
import { Package } from "lucide-react";
import OrderTable from "@/components/order-table"
import OrderTable from "@/components/order-table";
export default function OrdersPage() {
const router = useRouter();
useEffect(() => {
const authToken = document.cookie
.split("; ")
.find((row) => row.startsWith("Authorization="))
?.split("=")[1];
if (!authToken) {
router.push("/login");
}
}, [router]);
return (
<Dashboard>
<div className="space-y-6">
@@ -13,9 +30,8 @@ export default function OrdersPage() {
</h1>
</div>
{/* ✅ Order Table Component */}
<OrderTable />
</div>
</Dashboard>
);
}
}