38 lines
936 B
TypeScript
38 lines
936 B
TypeScript
import { useState } from "react";
|
|
import NavigationSidebar from "./components/NavigationSidebar";
|
|
import ProductManagement from "./components/ProductManagement";
|
|
import { Toaster } from "./components/ui/sonner";
|
|
|
|
export default function App() {
|
|
const [currentPage, setCurrentPage] = useState("product-management");
|
|
|
|
const handleNavigate = (path: string) => {
|
|
setCurrentPage(path);
|
|
};
|
|
|
|
const renderPage = () => {
|
|
switch (currentPage) {
|
|
case "product-management":
|
|
return <ProductManagement />;
|
|
default:
|
|
return <ProductManagement />;
|
|
}
|
|
};
|
|
|
|
return (
|
|
<div className="flex min-h-screen bg-background">
|
|
{/* Sidebar Navigation */}
|
|
<NavigationSidebar
|
|
currentPath={currentPage}
|
|
onNavigate={handleNavigate}
|
|
/>
|
|
|
|
{/* Main Content */}
|
|
<main className="flex-1 overflow-auto">
|
|
{renderPage()}
|
|
</main>
|
|
|
|
<Toaster />
|
|
</div>
|
|
);
|
|
} |