-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Une erreur apparaît quand on essaie d'accéder à une page qui nécessit…
…e une authent si l'utilisateut n'est pas authentifié #46
- Loading branch information
1 parent
b5b6d44
commit 7d9c4c1
Showing
4 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,32 @@ | ||
import { Typography } from "@mui/material"; | ||
import { AppBar, Box, CssBaseline, Toolbar, Typography } from "@mui/material"; | ||
import React from "react"; | ||
import { useRouteError } from "react-router-dom"; | ||
|
||
export function ErrorLayout({message: message}) { | ||
return <Typography>{message}</Typography> | ||
|
||
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 variant="h3">Oups... y a un soucis :(</Typography> | ||
<Typography variant="h5">{message}</Typography> | ||
<Typography sx={{marginTop: '1rem', marginBottom: '1rem'}} variant="h5">N'hésitez pas à nous signaler le problème</Typography> | ||
<Typography variant="h5"><a href='mailto:[email protected]'>Signaler le problème à [email protected]</a></Typography> | ||
<Typography variant="h5"><a href='/..'>Revenir à la page d'accueil</a></Typography> | ||
</Box> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters