1
1
import Head from 'next/head' ;
2
2
import Image from 'next/image' ;
3
3
import { PropsWithChildren , useRef } from 'react' ;
4
- import { Flex , Group , Select , Stack , Title , useMantineColorScheme } from '@mantine/core' ;
4
+ import { Flex , Group , LoadingOverlay , Select , Stack , Title , useMantineColorScheme } from '@mantine/core' ;
5
5
6
6
import { Import } from '@assets/icons' ;
7
7
import useStyles from './AppLayout.styles' ;
@@ -17,7 +17,7 @@ import { ColorSchemeToggle } from '@ui/toggle-color-scheme';
17
17
export function AppLayout ( { children } : PropsWithChildren ) {
18
18
const { classes } = useStyles ( ) ;
19
19
const navRef = useRef < HTMLElement > ( null ) ;
20
- const { profile, projects, createProject, projectId, setProjectId, logout } = useApp ( ) ;
20
+ const { profile, projects, createProject, projectId, setProjectId, logout, isProjectsLoading } = useApp ( ) ;
21
21
const { colorScheme } = useMantineColorScheme ( ) ;
22
22
23
23
return (
@@ -29,6 +29,7 @@ export function AppLayout({ children }: PropsWithChildren) {
29
29
< link rel = "icon" href = "/favicon.ico" />
30
30
</ Head >
31
31
< div className = { classes . root } >
32
+ < LoadingOverlay visible = { isProjectsLoading } />
32
33
< aside className = { classes . aside } >
33
34
< div className = { classes . logoContainer } >
34
35
< Image src = { colorScheme === 'dark' ? LogoWhite : LogoBlack } alt = "Impler Logo" width = { 140 } />
0 commit comments