From bc075c8fff7da8532821c58ebb498adb50eaa575 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 05:29:39 +0000 Subject: [PATCH] Fix: Resolve blank screen issue Investigate and fix the issue causing the app to display a blank screen. --- src/components/layout/NewModernLayout.tsx | 222 ++++++++++++---------- 1 file changed, 119 insertions(+), 103 deletions(-) diff --git a/src/components/layout/NewModernLayout.tsx b/src/components/layout/NewModernLayout.tsx index af15af6..2af05fe 100644 --- a/src/components/layout/NewModernLayout.tsx +++ b/src/components/layout/NewModernLayout.tsx @@ -59,18 +59,10 @@ const Logo = () => { ); }; -export default function NewModernLayout({ children }: NewModernLayoutProps) { +const SidebarContent = () => { const location = useLocation(); const { toggleSidebar } = useSidebar(); - const { - isOpen: tourOpen, - currentStep, - nextStep, - skipTour, - closeTour - } = useOnboardingTour(); - const mainItems = [ { title: "Dashboard", @@ -131,107 +123,131 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) { } ]; + return ( + <> + + + + + + + Principal + + + {mainItems.map((item) => ( + + + + + {item.title} + + + + ))} + + + + + + WhatsApp + + + {whatsappItems.map((item) => ( + + + + + {item.title} + + + + ))} + + + + + + + + + {configItems.map((item) => ( + + + + + {item.title} + + + + ))} + + + + + ); +}; + +const HeaderContent = () => { + const { toggleSidebar } = useSidebar(); + + return ( +
+
+ + + + + + +

Abrir/Fechar Menu

+
+
+
+ + Menu + +
+ +
+ +
+
+ ); +}; + +export default function NewModernLayout({ children }: NewModernLayoutProps) { + const { + isOpen: tourOpen, + currentStep, + nextStep, + skipTour, + closeTour + } = useOnboardingTour(); + return (
- - - - - - - Principal - - - {mainItems.map((item) => ( - - - - - {item.title} - - - - ))} - - - - - - WhatsApp - - - {whatsappItems.map((item) => ( - - - - - {item.title} - - - - ))} - - - - - - - - - {configItems.map((item) => ( - - - - - {item.title} - - - - ))} - - - + -
-
- - - - - - -

Abrir/Fechar Menu

-
-
-
- - Menu - -
- -
- -
-
+
{children}