From f804bc32b52a5fc0e4ab68555069adeb018a72cf Mon Sep 17 00:00:00 2001 From: Alexander Polynomdivision Date: Sun, 26 Aug 2018 17:19:55 +0200 Subject: [PATCH] feat: Add the menu button if authenticated --- package-lock.json | 9 +++++++++ package.json | 1 + src/components/app.tsx | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/package-lock.json b/package-lock.json index 0e915d4..a615705 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 56cafa6..e346f21 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/components/app.tsx b/src/components/app.tsx index bd6a68e..d1d194c 100644 --- a/src/components/app.tsx +++ b/src/components/app.tsx @@ -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> {
+ { + this.isAuthenticated() ? ( + + + + ) : undefined + } Lateinicus