Fix: Resolve import and type errors
The commit addresses two TypeScript errors in `src/components/layout/NewModernLayout.tsx`: a conflict in the import of `SidebarContent` and a type mismatch in the `children` prop. The changes should resolve these errors and ensure the application functions correctly.
This commit is contained in:
parent
bc075c8fff
commit
37fbe839f7
@ -59,9 +59,8 @@ const Logo = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const SidebarContent = () => {
|
const AppSidebar = () => {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { toggleSidebar } = useSidebar();
|
|
||||||
|
|
||||||
const mainItems = [
|
const mainItems = [
|
||||||
{
|
{
|
||||||
@ -124,7 +123,7 @@ const SidebarContent = () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Sidebar>
|
||||||
<SidebarHeader>
|
<SidebarHeader>
|
||||||
<Logo />
|
<Logo />
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
@ -195,7 +194,7 @@ const SidebarContent = () => {
|
|||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
</SidebarGroup>
|
</SidebarGroup>
|
||||||
</SidebarFooter>
|
</SidebarFooter>
|
||||||
</>
|
</Sidebar>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -242,9 +241,7 @@ export default function NewModernLayout({ children }: NewModernLayoutProps) {
|
|||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-background flex w-full">
|
<div className="min-h-screen bg-background flex w-full">
|
||||||
<SidebarProvider defaultOpen={false}>
|
<SidebarProvider defaultOpen={false}>
|
||||||
<Sidebar>
|
<AppSidebar />
|
||||||
<SidebarContent />
|
|
||||||
</Sidebar>
|
|
||||||
|
|
||||||
<SidebarInset className="flex-1">
|
<SidebarInset className="flex-1">
|
||||||
<HeaderContent />
|
<HeaderContent />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user