MCPcopy Create free account
hub / github.com/TryCatchLearn/Restore-v2 / ServerError

Function ServerError

client/src/app/errors/ServerError.tsx:4–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { useLocation } from "react-router-dom"
3
4export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected