MCPcopy Index your code
hub / github.com/flatlogic/react-material-admin / Error

Function Error

src/pages/error/Error.js:29–77  ·  view source on GitHub ↗
({ code })

Source from the content-addressed store, hash-verified

27};
28
29export default function Error({ code }) {
30 let classes = useStyles();
31 const location = useLocation();
32 const queryParams = new URLSearchParams(location.search);
33 const queryCode = Number(queryParams.get('code'));
34 const errorCode = Number(code) || queryCode || 404;
35 const content = ERROR_CONTENT[errorCode] || ERROR_CONTENT[404];
36
37 return (
38 <Grid container className={classes.container}>
39 <div className={classes.logotype}>
40 <img className={classes.logotypeIcon} src={logo} alt='logo' />
41 <Typography variant='h3' className={classes.logotypeText}>
42 React Material Admin Full
43 </Typography>
44 </div>
45 <Paper classes={{ root: classes.paperRoot }}>
46 <Typography
47 variant='h1'
48 color='primary'
49 className={classnames(classes.textRow, classes.errorCode)}
50 >
51 {errorCode}
52 </Typography>
53 <Typography variant='h5' color='primary' className={classes.textRow}>
54 {content.title}
55 </Typography>
56 <Typography
57 variant='h6'
58 color='text'
59 colorBrightness='hint'
60 className={classnames(classes.textRow, classes.safetyText)}
61 >
62 {content.description}
63 </Typography>
64 <Button
65 variant='contained'
66 color='primary'
67 component={Link}
68 to='/'
69 size='large'
70 className={classes.backButton}
71 >
72 Back to Home
73 </Button>
74 </Paper>
75 </Grid>
76 );
77}

Callers 15

bFunction · 0.85
SFunction · 0.85
OFunction · 0.85
wFunction · 0.85
CFunction · 0.85
TFunction · 0.85
DFunction · 0.85
aFunction · 0.85
oFunction · 0.85
VFunction · 0.85
YFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected