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 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";
|
||||
|
||||
@ -113,7 +113,7 @@ export default class Application extends React.Component<{}, IState> {
|
||||
// TODO: Don't fetch this when it was already fetched once.
|
||||
return [{
|
||||
german: ["Wein"],
|
||||
hint: "Worte auf '-um' sind meistens NeutrUM"
|
||||
hint: "Worte auf '-um' sind meistens NeutrUM",
|
||||
type: VocabType.NOMEN,
|
||||
latin: {
|
||||
grundform: "Vinum",
|
||||
@ -153,6 +153,12 @@ export default class Application extends React.Component<{}, IState> {
|
||||
return this.state.loggedIn === true;
|
||||
}
|
||||
|
||||
closeDrawer = () => {
|
||||
this.setState({
|
||||
drawerOpen: false,
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return <BrowserRouter
|
||||
basename="/app/">
|
||||
@ -202,10 +208,25 @@ export default class Application extends React.Component<{}, IState> {
|
||||
|
||||
<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" />
|
||||
</ListItem>
|
||||
<ListItem button>
|
||||
<ListItem
|
||||
component={Link}
|
||||
to="/levelList"
|
||||
onClick={this.closeDrawer}
|
||||
button>
|
||||
<ListItemText>
|
||||
Levelübersicht
|
||||
</ListItemText>
|
||||
@ -276,6 +297,12 @@ export default class Application extends React.Component<{}, IState> {
|
||||
return <Redirect to="/login" />;
|
||||
}
|
||||
}} />
|
||||
<AuthRoute
|
||||
isAuth={this.isAuthenticated}
|
||||
path="/review/queue"
|
||||
component={() => {
|
||||
return <h1>Get beaned!!</h1>;
|
||||
}} />
|
||||
<AuthRoute
|
||||
isAuth={this.isAuthenticated}
|
||||
path="/review/summary"
|
||||
|
Reference in New Issue
Block a user