feat: Add links to the level list and the dashboard
This commit is contained in:
parent
1e313915ce
commit
8da7123f62
@ -16,7 +16,7 @@ import SettingsIcon from "@material-ui/icons/Settings";
|
|||||||
import PersonIcon from "@material-ui/icons/Person";
|
import PersonIcon from "@material-ui/icons/Person";
|
||||||
import InfoIcon from "@material-ui/icons/Info";
|
import InfoIcon from "@material-ui/icons/Info";
|
||||||
|
|
||||||
import { BrowserRouter, Route, Redirect } from "react-router-dom";
|
import { BrowserRouter, Route, Redirect, Link } from "react-router-dom";
|
||||||
|
|
||||||
import AuthRoute from "../security/AuthRoute";
|
import AuthRoute from "../security/AuthRoute";
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ export default class Application extends React.Component<{}, IState> {
|
|||||||
// TODO: Don't fetch this when it was already fetched once.
|
// TODO: Don't fetch this when it was already fetched once.
|
||||||
return [{
|
return [{
|
||||||
german: ["Wein"],
|
german: ["Wein"],
|
||||||
hint: "Worte auf '-um' sind meistens NeutrUM"
|
hint: "Worte auf '-um' sind meistens NeutrUM",
|
||||||
type: VocabType.NOMEN,
|
type: VocabType.NOMEN,
|
||||||
latin: {
|
latin: {
|
||||||
grundform: "Vinum",
|
grundform: "Vinum",
|
||||||
@ -153,6 +153,12 @@ export default class Application extends React.Component<{}, IState> {
|
|||||||
return this.state.loggedIn === true;
|
return this.state.loggedIn === true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeDrawer = () => {
|
||||||
|
this.setState({
|
||||||
|
drawerOpen: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <BrowserRouter
|
return <BrowserRouter
|
||||||
basename="/app/">
|
basename="/app/">
|
||||||
@ -202,10 +208,25 @@ export default class Application extends React.Component<{}, IState> {
|
|||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
<ListItem button>
|
<ListItem
|
||||||
|
component={Link}
|
||||||
|
to="/dashboard"
|
||||||
|
onClick={this.closeDrawer}
|
||||||
|
button>
|
||||||
|
<ListItemText primary="Dashboard" />
|
||||||
|
</ListItem>
|
||||||
|
<ListItem
|
||||||
|
component={Link}
|
||||||
|
to="/review/queue"
|
||||||
|
onClick={this.closeDrawer}
|
||||||
|
button>
|
||||||
<ListItemText primary="Widerholen" />
|
<ListItemText primary="Widerholen" />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem button>
|
<ListItem
|
||||||
|
component={Link}
|
||||||
|
to="/levelList"
|
||||||
|
onClick={this.closeDrawer}
|
||||||
|
button>
|
||||||
<ListItemText>
|
<ListItemText>
|
||||||
Levelübersicht
|
Levelübersicht
|
||||||
</ListItemText>
|
</ListItemText>
|
||||||
@ -276,6 +297,12 @@ export default class Application extends React.Component<{}, IState> {
|
|||||||
return <Redirect to="/login" />;
|
return <Redirect to="/login" />;
|
||||||
}
|
}
|
||||||
}} />
|
}} />
|
||||||
|
<AuthRoute
|
||||||
|
isAuth={this.isAuthenticated}
|
||||||
|
path="/review/queue"
|
||||||
|
component={() => {
|
||||||
|
return <h1>Get beaned!!</h1>;
|
||||||
|
}} />
|
||||||
<AuthRoute
|
<AuthRoute
|
||||||
isAuth={this.isAuthenticated}
|
isAuth={this.isAuthenticated}
|
||||||
path="/review/summary"
|
path="/review/summary"
|
||||||
|
Reference in New Issue
Block a user