mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-11 18:51:47 +00:00
Create Error state
This commit is contained in:
22
dashboard/src/states/Error/Error.jsx
Normal file
22
dashboard/src/states/Error/Error.jsx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import {Stack, Typography, useMediaQuery, useTheme} from "@mui/material";
|
||||||
|
import ServerDown from "@/common/assets/images/error/server_down.svg";
|
||||||
|
|
||||||
|
export const Error = () => {
|
||||||
|
const theme = useTheme();
|
||||||
|
const isMobile = useMediaQuery(theme.breakpoints.down("lg"));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Stack direction="row" alignItems="center" justifyContent="center" sx={{height: "100vh"}} gap={5} p={3}>
|
||||||
|
<Stack direction="column" justifyContent="center" sx={{width: "30rem"}} gap={2}>
|
||||||
|
<Typography variant="h2" fontWeight={700}>Oh no..</Typography>
|
||||||
|
<Typography variant="h4" fontWeight={500}>The backend is currently not reachable.</Typography>
|
||||||
|
|
||||||
|
<Typography variant="h5" fontWeight={500}>
|
||||||
|
This page will reload automatically once the backend is reachable again.
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
{!isMobile && <img src={ServerDown} alt="Server down" height={350}/>}
|
||||||
|
</Stack>
|
||||||
|
)
|
||||||
|
}
|
||||||
1
dashboard/src/states/Error/index.js
Normal file
1
dashboard/src/states/Error/index.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {Error as default} from "./Error.jsx";
|
||||||
Reference in New Issue
Block a user