Skip to content

Commit

Permalink
customer area style initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpochat committed Jan 9, 2024
1 parent 27dd17f commit daa73e7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
33 changes: 25 additions & 8 deletions frontend/app/src/layouts/customer/LayoutWrapper.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { useKeycloak } from '@react-keycloak/web'

import {AppBar, Box, CssBaseline, IconButton, Toolbar, Typography} from '@mui/material'

export default function CustomerLayoutWrapper() {

const { keycloak, initialized } = useKeycloak()

if(process.env.REACT_APP_MOCK_API) {
return <div>Page client authentifié</div>
} else {
return keycloak.authenticated ? <div>Page client authentifié</div> : <div>Page client anonmye</div>
}
return (
<Box sx={{ display: 'flex' }}>
<CssBaseline />
<AppBar
position="fixed"
sx={{
zIndex: (theme) => theme.zIndex.drawer + 1,
}}
>
<Toolbar>
<Typography variant="h5" component="div" sx={{ flexGrow: 1 }}>
Viande en direct
</Typography>
</Toolbar>
</AppBar>
<Box
component="main"
sx={{ flexGrow: 1, p: 3 }}>
<Toolbar />
<Typography>Bienvenu dans l'espace client de ViandeEnDirect.eu</Typography>
</Box>
</Box>
)

}

2 changes: 1 addition & 1 deletion frontend/app/src/layouts/producer/AnonymousLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function AnonymousLayout() {
position="fixed"
>
<Toolbar>
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
<Typography variant="h5" component="div" sx={{ flexGrow: 1 }}>
Viande en direct
</Typography>
</Toolbar>
Expand Down

0 comments on commit daa73e7

Please sign in to comment.