Skip to content

Commit a350ad0

Browse files
feat projects loading (#208)
1 parent 5135baf commit a350ad0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/web/layouts/AppLayout/AppLayout.styles.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { createStyles, MantineTheme } from '@mantine/core';
44
const getRootStyles = (): React.CSSProperties => ({
55
height: '100vh',
66
display: 'flex',
7+
position: 'relative',
78
});
89

910
const getAsideStyles = (): React.CSSProperties => ({

apps/web/layouts/AppLayout/AppLayout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Head from 'next/head';
22
import Image from 'next/image';
33
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';
55

66
import { Import } from '@assets/icons';
77
import useStyles from './AppLayout.styles';
@@ -17,7 +17,7 @@ import { ColorSchemeToggle } from '@ui/toggle-color-scheme';
1717
export function AppLayout({ children }: PropsWithChildren) {
1818
const { classes } = useStyles();
1919
const navRef = useRef<HTMLElement>(null);
20-
const { profile, projects, createProject, projectId, setProjectId, logout } = useApp();
20+
const { profile, projects, createProject, projectId, setProjectId, logout, isProjectsLoading } = useApp();
2121
const { colorScheme } = useMantineColorScheme();
2222

2323
return (
@@ -29,6 +29,7 @@ export function AppLayout({ children }: PropsWithChildren) {
2929
<link rel="icon" href="/favicon.ico" />
3030
</Head>
3131
<div className={classes.root}>
32+
<LoadingOverlay visible={isProjectsLoading} />
3233
<aside className={classes.aside}>
3334
<div className={classes.logoContainer}>
3435
<Image src={colorScheme === 'dark' ? LogoWhite : LogoBlack} alt="Impler Logo" width={140} />

0 commit comments

Comments
 (0)