Fix scroll issue

This commit is contained in:
Pierre HUBERT 2021-05-14 13:45:36 +02:00
parent d01aa9272c
commit 41d568e493

View File

@ -115,67 +115,76 @@ export function MainRoute() {
return (
<Router>
<AppBar
position="absolute"
className={classes.appBar}
color="primary"
>
<Toolbar className={classes.toolbar}>
<Typography
component="h1"
variant="h6"
color="inherit"
noWrap
className={classes.title}
>
Comunic Console
</Typography>
<Typography>
{AccountHelper.currentAccount.name}
<br />
<small>{AccountHelper.currentAccount.email}</small>
</Typography>
<IconButton aria-label="delete" onClick={signOut}>
<CloseSharpIcon />
</IconButton>
</Toolbar>
</AppBar>
<div
style={{
display: "flex",
height: "100%",
flexDirection: "row",
width: "100%",
marginTop: "64px",
display: "flex",
flexDirection: "column",
}}
>
<Paper style={{ width: "200px" }}>
<Menu></Menu>
</Paper>
<Toolbar></Toolbar>
<div style={{ flex: "1", padding: "50px", height: "100%" }}>
<div
style={{
height: "100%",
margin: "auto",
maxWidth: "1280px",
}}
>
<Switch>
<Route exact path="/">
<HomeRoute></HomeRoute>
</Route>
<AppBar
position="fixed"
className={classes.appBar}
color="primary"
>
<Toolbar className={classes.toolbar}>
<Typography
component="h1"
variant="h6"
color="inherit"
noWrap
className={classes.title}
>
Comunic Console
</Typography>
<Route path="/accounts/:id">
<AccountSettingsRoute></AccountSettingsRoute>
</Route>
<Typography>
{AccountHelper.currentAccount.name}
<br />
<small>{AccountHelper.currentAccount.email}</small>
</Typography>
<Route path="*">
<NotFoundRoute></NotFoundRoute>
</Route>
</Switch>
<IconButton aria-label="delete" onClick={signOut}>
<CloseSharpIcon />
</IconButton>
</Toolbar>
</AppBar>
<div
style={{
display: "flex",
flex: "1",
flexDirection: "row",
width: "100%",
}}
>
<Paper style={{ width: "200px" }}>
<Menu></Menu>
</Paper>
<div style={{ flex: "1", padding: "50px" }}>
<div
style={{
height: "100%",
margin: "auto",
maxWidth: "1280px",
}}
>
<Switch>
<Route exact path="/">
<HomeRoute></HomeRoute>
</Route>
<Route path="/accounts/:id">
<AccountSettingsRoute></AccountSettingsRoute>
</Route>
<Route path="*">
<NotFoundRoute></NotFoundRoute>
</Route>
</Switch>
</div>
</div>
</div>
</div>