Created a dialog to select an account

This commit is contained in:
2025-04-22 20:23:25 +02:00
parent 2afedcd5f9
commit 639fa4b176
4 changed files with 202 additions and 29 deletions

View File

@ -7,6 +7,7 @@ import { AccountsListProvider } from "../hooks/AccountsListProvider";
import { AsyncWidget } from "./AsyncWidget";
import { MoneyNavList } from "./MoneyNavList";
import { MoneyWebAppBar } from "./MoneyWebAppBar";
import { ChooseAccountDialogProvider } from "../hooks/context_providers/ChooseAccountDialogProvider";
interface AuthInfoContext {
info: AuthInfo;
@ -48,44 +49,46 @@ export function BaseAuthenticatedPage(): React.ReactElement {
}}
>
<AccountsListProvider>
<Box
component="div"
sx={{
minHeight: "100vh",
display: "flex",
flexDirection: "column",
backgroundColor: (theme) =>
theme.palette.mode === "light"
? theme.palette.grey[100]
: theme.palette.grey[900],
color: (theme) =>
theme.palette.mode === "light"
? theme.palette.grey[900]
: theme.palette.grey[100],
}}
>
<MoneyWebAppBar onSignOut={signOut} />
<ChooseAccountDialogProvider>
<Box
component="div"
sx={{
minHeight: "100vh",
display: "flex",
flex: "2",
flexDirection: "column",
backgroundColor: (theme) =>
theme.palette.mode === "light"
? theme.palette.grey[100]
: theme.palette.grey[900],
color: (theme) =>
theme.palette.mode === "light"
? theme.palette.grey[900]
: theme.palette.grey[100],
}}
>
<MoneyNavList />
<div
style={{
flexGrow: 1,
flexShrink: 0,
flexBasis: 0,
minWidth: 0,
<MoneyWebAppBar onSignOut={signOut} />
<Box
sx={{
display: "flex",
flex: "2",
}}
>
<Outlet />
</div>
<MoneyNavList />
<div
style={{
flexGrow: 1,
flexShrink: 0,
flexBasis: 0,
minWidth: 0,
display: "flex",
}}
>
<Outlet />
</div>
</Box>
</Box>
</Box>
</ChooseAccountDialogProvider>
</AccountsListProvider>
</AuthInfoContextK>
)}