update navbar , create pages
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
import React from 'react';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { Sidebar } from './Sidebar';
|
||||
import { CabinetNav } from './CabinetNav';
|
||||
import { Dashboard } from './dashboard';
|
||||
import { useCabinet } from '../lib/hooks/useCabinet';
|
||||
import { MOCK_USER, MOCK_STATS } from '../lib/mock';
|
||||
@@ -69,31 +67,15 @@ const FADE = {
|
||||
// ─── CabinetLayout ────────────────────────────────────────────────────────────
|
||||
|
||||
export const CabinetLayout: React.FC = () => {
|
||||
const { activeSection, navigate, isSidebarOpen, toggleSidebar } =
|
||||
useCabinet();
|
||||
const fullName = `${MOCK_USER.first_name} ${MOCK_USER.last_name}`;
|
||||
const { activeSection } = useCabinet();
|
||||
|
||||
return (
|
||||
<div className="flex bg-slate-50 min-h-screen">
|
||||
<Sidebar
|
||||
active={activeSection}
|
||||
onNavigate={navigate}
|
||||
isOpen={isSidebarOpen}
|
||||
onClose={toggleSidebar}
|
||||
userName={fullName}
|
||||
/>
|
||||
|
||||
<div className="flex-1 flex flex-col min-w-0">
|
||||
<CabinetNav activeSection={activeSection} onMenuClick={toggleSidebar} />
|
||||
|
||||
<main className="flex-1 p-4 md:p-6 lg:p-8 max-w-6xl mx-auto w-full">
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.div key={activeSection} {...FADE}>
|
||||
<SectionContent section={activeSection} />
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<main className="flex-1 p-4 md:p-6 lg:p-8 max-w-6xl mx-auto w-full pt-20">
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.div key={activeSection} {...FADE}>
|
||||
<SectionContent section={activeSection} />
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user