1- import { Box , Divider , Flex } from "@chakra-ui/react"
1+ import { Box , Flex } from "@chakra-ui/react"
22import { Outlet , createFileRoute , redirect } from "@tanstack/react-router"
33import { Suspense } from "react"
44
5+ import Footer from "../components/Common/Footer"
56import Sidebar from "../components/Common/Sidebar"
67import UserMenu from "../components/Common/UserMenu"
78import TeamInvitation from "../components/Invitations/TeamInvitation"
@@ -22,43 +23,45 @@ export const Route = createFileRoute("/_layout")({
2223function Layout ( ) {
2324 return (
2425 < >
25- < Flex maxW = "large" h = "auto" >
26- { /* Sidebar */ }
27- < Box
28- position = "fixed"
29- top = "0"
30- left = "0"
31- height = "100vh"
32- width = { { md : "250px" } }
33- zIndex = "3"
34- bg = "white"
35- >
36- < Suspense >
37- < Sidebar />
38- </ Suspense >
39- </ Box >
40- < Flex flexDir = "column" flex = "1" ml = "250px" >
41- { /* Navbar */ }
26+ < Flex minHeight = "100vh" flexDirection = "column" >
27+ < Flex flex = "1" >
28+ { /* Sidebar */ }
4229 < Box
43- display = { { base : "none" , md : "flex" } }
44- justifyContent = "flex-end"
4530 position = "fixed"
4631 top = "0"
47- right = "0"
48- left = { { base : 0 , md : "250px" } }
49- h = "5%"
50- zIndex = "2"
51- p = { 4 }
52- bg = "white"
32+ left = "0"
33+ height = "100vh"
34+ width = { { md : "250px" } }
35+ zIndex = "3"
5336 >
54- < UserMenu />
55- </ Box >
56- < Divider />
57- { /* Main Content */ }
58- < Box w = "100%" mt = "5%" p = { 10 } >
59- < Outlet />
37+ < Suspense >
38+ < Sidebar />
39+ </ Suspense >
6040 </ Box >
41+ < Flex flexDir = "column" flex = "1" ml = { { base : 0 , md : "250px" } } >
42+ { /* Navbar */ }
43+ < Box
44+ id = "navbar"
45+ display = { { base : "none" , md : "flex" } }
46+ justifyContent = "flex-end"
47+ position = "fixed"
48+ top = "0"
49+ right = "0"
50+ left = { { base : 0 , md : "250px" } }
51+ height = "64px"
52+ zIndex = "2"
53+ p = { 4 }
54+ gap = "2"
55+ >
56+ < UserMenu />
57+ </ Box >
58+ { /* Main Content */ }
59+ < Box w = "80%" p = { 10 } mt = "64px" mx = "auto" >
60+ < Outlet />
61+ </ Box >
62+ </ Flex >
6163 </ Flex >
64+ < Footer />
6265 </ Flex >
6366 < TeamInvitation />
6467 </ >
0 commit comments