Merge version_2 into main #2

Merged
bender merged 2 commits from version_2 into main 2026-04-29 01:08:00 +00:00
2 changed files with 66 additions and 1 deletions

View File

@@ -0,0 +1,64 @@
"use client";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import ReactLenis from "lenis/react";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import { useState } from 'react';
export default function AdminDashboardPage() {
const [orders, setOrders] = useState([
{ id: '1', product: 'Berber Rug', customer: 'Amira M.', city: 'Casablanca', status: 'pending' },
{ id: '2', product: 'Ceramic Tagine', customer: 'Youssef K.', city: 'Marrakech', status: 'confirmed' },
{ id: '3', product: 'Brass Lantern', customer: 'Sarah D.', city: 'Rabat', status: 'delivered' },
]);
const updateStatus = (id: string, newStatus: string) => {
setOrders(orders.map(o => o.id === id ? { ...o, status: newStatus } : o));
};
return (
<ThemeProvider>
<ReactLenis root>
<NavbarStyleApple
navItems={[{ name: "Home", id: "/" }, { name: "Dashboard", id: "/admin/dashboard" }]}
brandName="RoseSouk Admin"
/>
<main className="pt-32 pb-20 px-8 container mx-auto">
<h1 className="text-4xl font-bold mb-8">Order Management</h1>
<div className="overflow-x-auto">
<table className="w-full text-left border-collapse">
<thead>
<tr className="border-b">
<th className="p-4">Product</th>
<th className="p-4">Customer</th>
<th className="p-4">City</th>
<th className="p-4">Status</th>
</tr>
</thead>
<tbody>
{orders.map(order => (
<tr key={order.id} className="border-b">
<td className="p-4">{order.product}</td>
<td className="p-4">{order.customer}</td>
<td className="p-4">{order.city}</td>
<td className="p-4">
<select
value={order.status}
onChange={(e) => updateStatus(order.id, e.target.value)}
className="p-2 border rounded bg-transparent"
>
<option value="pending">Pending</option>
<option value="confirmed">Confirmed</option>
<option value="delivered">Delivered</option>
</select>
</td>
</tr>
))}
</tbody>
</table>
</div>
</main>
</ReactLenis>
</ThemeProvider>
);
}

View File

@@ -33,6 +33,7 @@ export default function LandingPage() {
{ name: "Products", id: "products" },
{ name: "About", id: "about" },
{ name: "Contact", id: "contact" },
{ name: "Admin", id: "/admin/dashboard" },
]}
brandName="RoseSouk"
/>
@@ -155,4 +156,4 @@ export default function LandingPage() {
</ReactLenis>
</ThemeProvider>
);
}
}