diff --git a/src/components/Drawer.tsx b/src/components/Drawer.tsx index 394d275..1499ff0 100644 --- a/src/components/Drawer.tsx +++ b/src/components/Drawer.tsx @@ -6,6 +6,7 @@ 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 Button from "@material-ui/core/Button"; import SwipeableDrawer from "@material-ui/core/SwipeableDrawer"; import List from "@material-ui/core/List"; import ListItem from "@material-ui/core/ListItem"; @@ -21,9 +22,12 @@ import HomeIcon from "@material-ui/icons/Home"; import BookIcon from "@material-ui/icons/Book"; import ViewWeekIcon from "@material-ui/icons/ViewWeek"; +import { IUser } from "../models/user"; + interface IProps { logout: () => void; + user: IUser; open: boolean; showButton: boolean; authenticated: boolean; @@ -55,6 +59,13 @@ export default class Drawer extends React.Component { Lateinicus + { + this.props.authenticated ? ( + + ) : undefined + } { return { + user: state.user, open: state.drawer, authenticated: state.authenticated, showButton: state.drawerButton, diff --git a/src/models/user.ts b/src/models/user.ts index 5f1cf7a..9d7232e 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -2,6 +2,7 @@ export interface IUser { username: string; uid: string; showWelcome: boolean; + score: number; sessionToken: string; }; diff --git a/src/pages/intro.tsx b/src/pages/intro.tsx index d4e2c2f..6907155 100644 --- a/src/pages/intro.tsx +++ b/src/pages/intro.tsx @@ -68,6 +68,7 @@ export default class IntroPage extends React.Component<{}> { + {/*TODO: Tell the server to not show this page again*/}