()
| 2 | import { useLocation } from "react-router-dom" |
| 3 | |
| 4 | export default function ServerError() { |
| 5 | const {state} = useLocation(); |
| 6 | |
| 7 | return ( |
| 8 | <Paper> |
| 9 | {state.error ? ( |
| 10 | <> |
| 11 | <Typography gutterBottom variant="h3" sx={{px: 4, pt: 2}} color="secondary"> |
| 12 | {state.error.title} |
| 13 | </Typography> |
| 14 | <Divider /> |
| 15 | <Typography variant="body1" sx={{p: 4}}>{state.error.detail}</Typography> |
| 16 | </> |
| 17 | ) : ( |
| 18 | <Typography variant="h5" gutterBottom>Server error</Typography> |
| 19 | )} |
| 20 | </Paper> |
| 21 | ) |
| 22 | } |
nothing calls this directly
no outgoing calls
no test coverage detected