feat: Add the menu button if authenticated

This commit is contained in:
Alexander Polynomdivision 2018-08-26 17:19:55 +02:00
parent be5b5548fc
commit f804bc32b5
3 changed files with 19 additions and 0 deletions

9
package-lock.json generated
View File

@ -53,6 +53,15 @@
"warning": "^4.0.1"
}
},
"@material-ui/icons": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-2.0.3.tgz",
"integrity": "sha512-wgKUB4vgCzdKseV3MHdsR7lZMyNYKykrghKX4GHuMmlZrrWMh26jO1E6xyjuCpJ/E8DX+m+YGURbBYN9CxZ+rw==",
"requires": {
"@babel/runtime": "7.0.0-rc.1",
"recompose": "^0.28.0"
}
},
"@mrmlnc/readdir-enhanced": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",

View File

@ -11,6 +11,7 @@
"license": "ISC",
"dependencies": {
"@material-ui/core": "^1.5.1",
"@material-ui/icons": "^2.0.3",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-router-dom": "^4.3.1"

View File

@ -3,6 +3,8 @@ import * as React from "react";
import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
import Typography from "@material-ui/core/Typography";
import IconButton from "@material-ui/core/IconButton";
import MenuIcon from "@material-ui/icons/Menu";
import { BrowserRouter, Route, Redirect } from "react-router-dom";
@ -85,6 +87,13 @@ export default class Application extends React.Component<{}, IState> {
<div className="flex">
<AppBar position="static">
<Toolbar>
{
this.isAuthenticated() ? (
<IconButton color="inherit">
<MenuIcon />
</IconButton>
) : undefined
}
<Typography className="flex" variant="title" color="inherit">
Lateinicus
</Typography>