Skip to content

Commit

Permalink
fix(web-ui): use same theme for loading screen (#921)
Browse files Browse the repository at this point in the history
Co-authored-by: Johan Book <{ID}+{username}@users.noreply.github.com>
  • Loading branch information
johanbook and Johan Book committed Jul 21, 2024
1 parent eef7a6c commit 2f18586
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
12 changes: 6 additions & 6 deletions services/web-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import { QUERY_CLIENT } from "./queryQlient";

export function App(): ReactElement {
return (
<Suspense fallback={<LoadingView />}>
<QueryClientProvider client={QUERY_CLIENT}>
<ThemeProvider>
<QueryClientProvider client={QUERY_CLIENT}>
<ThemeProvider>
<Suspense fallback={<LoadingView />}>
<AuthenticationGuard>
<NotificationProvider>
<Router />
<SnackbarProvider dense />
</NotificationProvider>
</AuthenticationGuard>
</ThemeProvider>
</QueryClientProvider>
</Suspense>
</Suspense>
</ThemeProvider>
</QueryClientProvider>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export interface AuthenticationGuardNavProps {
export function AuthenticationGuardNav({
children,
}: AuthenticationGuardNavProps): React.ReactElement {
return <Box sx={{ p: 3, height: "100vh" }}>{children}</Box>;
return <Box sx={{ height: "100vh" }}>{children}</Box>;
}
20 changes: 4 additions & 16 deletions services/web-ui/src/pages/ProfileGuard/ProfileGuard.nav.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
import React from "react";
import { ReactNode } from "react";

import { Box, Container, Toolbar } from "@mui/material";

import { AppBar } from "src/components/nav/AppBar";
import { Box } from "@mui/material";

interface ProfileGuardNavProps {
children: React.ReactNode;
children: ReactNode;
}

export function ProfileGuardNav({
children,
}: ProfileGuardNavProps): React.ReactElement {
return (
<Box sx={{ display: "flex", height: "100vh" }}>
<AppBar />
<Box component="main" sx={{ flexGrow: 1, p: 3, pt: 1, height: "100%" }}>
<Toolbar />
<Container maxWidth="md" sx={{ height: "100%" }}>
{children}
</Container>
</Box>
</Box>
);
return <Box sx={{ height: "100vh" }}>{children}</Box>;
}

0 comments on commit 2f18586

Please sign in to comment.