Changeset 5938bc9 for frontend/src/App.tsx
- Timestamp:
- 02/07/26 14:59:57 (5 months ago)
- Branches:
- main
- Children:
- ebdd3d4
- Parents:
- 591919d
- File:
-
- 1 edited
-
frontend/src/App.tsx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/App.tsx
r591919d r5938bc9 4 4 import "react-toastify/dist/ReactToastify.css"; 5 5 import Sidebar from "./components/Sidebar"; 6 import { useAuth } from "./context/authContext"; 6 7 import AllUsers from "./pages/AllUsers"; 7 8 import LandingPage from "./pages/LandingPage"; … … 12 13 import UserDetail from "./pages/UserDetail"; 13 14 14 const Layout = () => { 15 const [isSidebarOpen, setIsSidebarOpen] = useState(true); 15 const MainLayout = () => { 16 const { user } = useAuth(); 17 const [isSidebarOpen, setIsSidebarOpen] = useState(!!user); 16 18 17 19 return ( … … 43 45 </div> 44 46 ); 47 }; 48 49 const Layout = () => { 50 const { isAuthLoading } = useAuth(); 51 52 if (isAuthLoading) { 53 return ( 54 <div className="flex h-screen items-center justify-center bg-[#121212]"> 55 <div className="w-12 h-12 border-4 border-white/10 border-t-[#1db954] rounded-full animate-spin"></div> 56 </div> 57 ); 58 } 59 60 return <MainLayout />; 45 61 }; 46 62
Note:
See TracChangeset
for help on using the changeset viewer.
