Fix: Resolve blank screen issue
Investigate and fix the issue causing the app to display a blank screen.
This commit is contained in:
parent
b18ebd96c7
commit
bc075c8fff
@ -59,18 +59,10 @@ const Logo = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
const SidebarContent = () => {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { toggleSidebar } = useSidebar();
|
const { toggleSidebar } = useSidebar();
|
||||||
|
|
||||||
const {
|
|
||||||
isOpen: tourOpen,
|
|
||||||
currentStep,
|
|
||||||
nextStep,
|
|
||||||
skipTour,
|
|
||||||
closeTour
|
|
||||||
} = useOnboardingTour();
|
|
||||||
|
|
||||||
const mainItems = [
|
const mainItems = [
|
||||||
{
|
{
|
||||||
title: "Dashboard",
|
title: "Dashboard",
|
||||||
@ -132,9 +124,7 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-background flex w-full">
|
<>
|
||||||
<SidebarProvider defaultOpen={false}>
|
|
||||||
<Sidebar>
|
|
||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
<Logo />
|
<Logo />
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
@ -205,9 +195,14 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
|||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
</SidebarGroup>
|
</SidebarGroup>
|
||||||
</SidebarFooter>
|
</SidebarFooter>
|
||||||
</Sidebar>
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
<SidebarInset className="flex-1">
|
const HeaderContent = () => {
|
||||||
|
const { toggleSidebar } = useSidebar();
|
||||||
|
|
||||||
|
return (
|
||||||
<div className="sticky top-0 z-50 flex h-16 shrink-0 items-center gap-2 border-b px-4 bg-white/95 backdrop-blur supports-[backdrop-filter]:bg-white/60">
|
<div className="sticky top-0 z-50 flex h-16 shrink-0 items-center gap-2 border-b px-4 bg-white/95 backdrop-blur supports-[backdrop-filter]:bg-white/60">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
@ -232,6 +227,27 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
|||||||
<UserProfileButton />
|
<UserProfileButton />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
||||||
|
const {
|
||||||
|
isOpen: tourOpen,
|
||||||
|
currentStep,
|
||||||
|
nextStep,
|
||||||
|
skipTour,
|
||||||
|
closeTour
|
||||||
|
} = useOnboardingTour();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="min-h-screen bg-background flex w-full">
|
||||||
|
<SidebarProvider defaultOpen={false}>
|
||||||
|
<Sidebar>
|
||||||
|
<SidebarContent />
|
||||||
|
</Sidebar>
|
||||||
|
|
||||||
|
<SidebarInset className="flex-1">
|
||||||
|
<HeaderContent />
|
||||||
<main className="flex-1 overflow-y-auto">
|
<main className="flex-1 overflow-y-auto">
|
||||||
<div className="container mx-auto px-4 py-6">
|
<div className="container mx-auto px-4 py-6">
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user