feat(admin): added dashboard comp.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { useState } from "react";
|
||||
|
||||
import { Outlet } from "react-router";
|
||||
import Sidebar from "../components/dashboards/Sidebar";
|
||||
import Topbar from "../components/dashboards/Topbar";
|
||||
|
||||
|
||||
export default function DashboardLayout() {
|
||||
const [isCollapsed, setIsCollapsed] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-background">
|
||||
{/* Sidebar */}
|
||||
<Sidebar isCollapsed={isCollapsed} />
|
||||
|
||||
<div className="flex flex-1 flex-col">
|
||||
{/* Topbar */}
|
||||
<Topbar
|
||||
toggleSidebar={() => setIsCollapsed(!isCollapsed)}
|
||||
isCollapsed={isCollapsed}
|
||||
/>
|
||||
|
||||
{/* Main Content */}
|
||||
<main className="p-6 transition-all duration-300">
|
||||
<Outlet/>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Outlet } from "react-router-dom";
|
||||
import Navbar from "@/components/Navbar";
|
||||
import Footer from "@/components/Footer";
|
||||
|
||||
const MainLayout = () => {
|
||||
return (
|
||||
<>
|
||||
<Navbar />
|
||||
<Outlet />
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default MainLayout;
|
||||
Reference in New Issue
Block a user