fix(erp): enable erp pages and menu items
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, Suspense } from 'react';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { SidebarRail, MenuItem } from './SidebarRail';
|
||||
import { TopBar } from './TopBar';
|
||||
@@ -20,11 +20,13 @@ export const DashboardLayout: React.FC<DashboardLayoutProps> = ({ children, menu
|
||||
<div className="flex h-screen w-full bg-gray-100 dark:bg-zinc-950 text-slate-900 dark:text-slate-100 overflow-hidden md:p-3 md:gap-3 transition-colors duration-300">
|
||||
{/* Sidebar controla seu próprio estado visual via props - Desktop Only */}
|
||||
<div className="hidden md:flex">
|
||||
<SidebarRail
|
||||
isExpanded={isExpanded}
|
||||
onToggle={() => setIsExpanded(!isExpanded)}
|
||||
menuItems={menuItems}
|
||||
/>
|
||||
<Suspense fallback={<div className="w-[80px] bg-white dark:bg-zinc-900" />}>
|
||||
<SidebarRail
|
||||
isExpanded={isExpanded}
|
||||
onToggle={() => setIsExpanded(!isExpanded)}
|
||||
menuItems={menuItems}
|
||||
/>
|
||||
</Suspense>
|
||||
</div>
|
||||
|
||||
{/* Área de Conteúdo (Children) */}
|
||||
@@ -46,7 +48,9 @@ export const DashboardLayout: React.FC<DashboardLayoutProps> = ({ children, menu
|
||||
</main>
|
||||
|
||||
{/* Mobile Bottom Bar */}
|
||||
<MobileBottomBar menuItems={menuItems} />
|
||||
<Suspense fallback={null}>
|
||||
<MobileBottomBar menuItems={menuItems} />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user