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 { toggleSidebar } = useSidebar();
|
||||
|
||||
const {
|
||||
isOpen: tourOpen,
|
||||
currentStep,
|
||||
nextStep,
|
||||
skipTour,
|
||||
closeTour
|
||||
} = useOnboardingTour();
|
||||
|
||||
const mainItems = [
|
||||
{
|
||||
title: "Dashboard",
|
||||
@ -132,9 +124,7 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-background flex w-full">
|
||||
<SidebarProvider defaultOpen={false}>
|
||||
<Sidebar>
|
||||
<>
|
||||
<SidebarHeader>
|
||||
<Logo />
|
||||
</SidebarHeader>
|
||||
@ -205,9 +195,14 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
||||
</SidebarMenu>
|
||||
</SidebarGroup>
|
||||
</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="flex items-center gap-2">
|
||||
<TooltipProvider>
|
||||
@ -232,6 +227,27 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
||||
<UserProfileButton />
|
||||
</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">
|
||||
<div className="container mx-auto px-4 py-6">
|
||||
{children}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user