diff --git a/inventory/src/App.tsx b/inventory/src/App.tsx index a83c548..bae9526 100644 --- a/inventory/src/App.tsx +++ b/inventory/src/App.tsx @@ -51,36 +51,20 @@ function App() { } /> - - ) : ( - - ) - } - /> - - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - - ) : ( - - ) - } - /> + {isLoggedIn ? ( + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + ) : ( + } /> + )} ); diff --git a/inventory/src/components/layout/AppSidebar.tsx b/inventory/src/components/layout/AppSidebar.tsx index f1417a9..73563b7 100644 --- a/inventory/src/components/layout/AppSidebar.tsx +++ b/inventory/src/components/layout/AppSidebar.tsx @@ -20,7 +20,7 @@ import { SidebarMenuItem, SidebarSeparator, } from "@/components/ui/sidebar"; -import { useLocation, useNavigate } from "react-router-dom"; +import { useLocation, useNavigate, Link } from "react-router-dom"; const items = [ { @@ -86,12 +86,12 @@ export function AppSidebar() { tooltip={item.title} isActive={isActive} > - + {item.title} - + ); @@ -110,12 +110,12 @@ export function AppSidebar() { tooltip="Settings" isActive={location.pathname === "/settings"} > - + Settings - + diff --git a/inventory/src/components/layout/MainLayout.tsx b/inventory/src/components/layout/MainLayout.tsx index 05bc0e0..be1f815 100644 --- a/inventory/src/components/layout/MainLayout.tsx +++ b/inventory/src/components/layout/MainLayout.tsx @@ -1,11 +1,8 @@ import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"; import { AppSidebar } from "./AppSidebar"; +import { Outlet } from "react-router-dom"; -interface MainLayoutProps { - children: React.ReactNode; -} - -export function MainLayout({ children }: MainLayoutProps) { +export function MainLayout() { return ( @@ -13,9 +10,9 @@ export function MainLayout({ children }: MainLayoutProps) { - + - {children} +