From 43127dc53f6bf5d2f663a60f5a983bae070b6bf5 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 5 Dec 2017 17:30:20 +0000 Subject: [PATCH] Put username on the upper right corner. --- src/App.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index e22e3c7..2e2c0c0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,7 @@ import AppBar from 'material-ui/AppBar'; import Drawer from 'material-ui/Drawer'; import IconButton from 'material-ui/IconButton'; import { List, ListItem } from 'material-ui/List'; +import FlatButton from 'material-ui/FlatButton'; import Subheader from 'material-ui/Subheader'; import Divider from 'material-ui/Divider'; import ActionCode from 'material-ui/svg-icons/action/code'; @@ -75,7 +76,7 @@ class App extends React.Component { }; props: { - credentials?: store.CredentialsData; + credentials?: store.CredentialsType; }; constructor(props: any) { @@ -101,6 +102,10 @@ class App extends React.Component { } render() { + const username = (this.props.credentials && this.props.credentials.value) ? + + : undefined; + return ( @@ -108,6 +113,7 @@ class App extends React.Component { } + iconElementRight={username} />