first commit
This commit is contained in:
38
source-code/ERP(A-a)-商品建檔管理/src/App.tsx
Normal file
38
source-code/ERP(A-a)-商品建檔管理/src/App.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user