File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
src/app/(authed)/(project-doc)/[...slug] Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -4,36 +4,33 @@ import { Box, Stack } from "@mui/material"
44import { useTheme } from "@mui/material/styles"
55import TrailingToolbarItem from "@/features/projects/view/toolbar/TrailingToolbarItem"
66import MobileToolbar from "@/features/projects/view/toolbar/MobileToolbar"
7- import { useProjectSelection } from "@/features/projects/data"
87import SecondaryHeaderPlaceholder from "@/features/sidebar/view/SecondarySplitHeaderPlaceholder"
9- import SecondarySplitHeader from "@/features/sidebar/view/SecondarySplitHeader"
108import { useContext } from "react"
119import { ProjectsContext } from "@/common"
1210import LoadingIndicator from "@/common/ui/LoadingIndicator"
11+ import SecondarySplitHeader from "@/features/sidebar/view/SecondarySplitHeader"
1312
1413export default function Page ( { children } : { children : React . ReactNode } ) {
15- const { project } = useProjectSelection ( )
1614 const { refreshed } = useContext ( ProjectsContext )
1715
1816 const theme = useTheme ( )
1917
2018 return (
2119 < Stack sx = { { height : "100%" } } >
22- { refreshed ?
2320 < >
24- { project &&
21+ { ! refreshed ? < SecondaryHeaderPlaceholder /> :
2522 < SecondarySplitHeader mobileToolbar = { < MobileToolbar /> } >
2623 < TrailingToolbarItem />
2724 </ SecondarySplitHeader >
2825 }
29- { ! project && < SecondaryHeaderPlaceholder /> }
3026 < Box sx = { { height : "0.5px" , background : theme . palette . divider } } />
31- < main style = { { flexGrow : "1" , overflowY : "auto" } } >
32- { children }
33- </ main >
27+ { refreshed ?
28+ < main style = { { flexGrow : "1" , overflowY : "auto" } } >
29+ { children }
30+ </ main > :
31+ < LoadingIndicator />
32+ }
3433 </ >
35- : < LoadingIndicator />
36- }
3734 </ Stack >
3835 )
3936}
You can’t perform that action at this time.
0 commit comments