mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 03:05:53 +08:00
Add 404 page
This commit is contained in:
parent
b572b76a0b
commit
41c4eb8097
@ -34,6 +34,7 @@ import TasksView from "./views/TasksView";
|
|||||||
import SettingsView from "./views/SettingsView";
|
import SettingsView from "./views/SettingsView";
|
||||||
import ServersView from "./views/ServersView";
|
import ServersView from "./views/ServersView";
|
||||||
import RedisInfoView from "./views/RedisInfoView";
|
import RedisInfoView from "./views/RedisInfoView";
|
||||||
|
import PageNotFoundView from "./views/PageNotFoundView";
|
||||||
|
|
||||||
const drawerWidth = 220;
|
const drawerWidth = 220;
|
||||||
|
|
||||||
@ -273,9 +274,12 @@ function App(props: ConnectedProps<typeof connector>) {
|
|||||||
<Route exact path={paths.SETTINGS}>
|
<Route exact path={paths.SETTINGS}>
|
||||||
<SettingsView />
|
<SettingsView />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path={paths.HOME}>
|
<Route exact path={paths.HOME}>
|
||||||
<DashboardView />
|
<DashboardView />
|
||||||
</Route>
|
</Route>
|
||||||
|
<Route path="*">
|
||||||
|
<PageNotFoundView />
|
||||||
|
</Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
37
ui/src/views/PageNotFoundView.tsx
Normal file
37
ui/src/views/PageNotFoundView.tsx
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import React from "react";
|
||||||
|
import Container from "@material-ui/core/Container";
|
||||||
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
|
import Grid from "@material-ui/core/Grid";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
|
||||||
|
const useStyles = makeStyles((theme) => ({
|
||||||
|
container: {
|
||||||
|
paddingTop: theme.spacing(4),
|
||||||
|
paddingBottom: theme.spacing(4),
|
||||||
|
},
|
||||||
|
headingText: {
|
||||||
|
fontWeight: "bold",
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
export default function PageNotFoundView() {
|
||||||
|
const classes = useStyles();
|
||||||
|
return (
|
||||||
|
<Container maxWidth="lg" className={classes.container}>
|
||||||
|
<Grid container spacing={3}>
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Typography
|
||||||
|
variant="h5"
|
||||||
|
align="center"
|
||||||
|
className={classes.headingText}
|
||||||
|
>
|
||||||
|
Oops!
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subtitle1" color="textSecondary" align="center">
|
||||||
|
404 - Page Not Found
|
||||||
|
</Typography>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
@ -18,12 +18,6 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
paddingTop: theme.spacing(4),
|
paddingTop: theme.spacing(4),
|
||||||
paddingBottom: theme.spacing(4),
|
paddingBottom: theme.spacing(4),
|
||||||
},
|
},
|
||||||
paper: {
|
|
||||||
padding: theme.spacing(2),
|
|
||||||
display: "flex",
|
|
||||||
overflow: "auto",
|
|
||||||
flexDirection: "column",
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function mapStateToProps(state: AppState) {
|
function mapStateToProps(state: AppState) {
|
||||||
|
Loading…
Reference in New Issue
Block a user