Made an error while reverting the commit

This commit is contained in:
Unknown committed 2018-11-07 22:28:35 +01:00
1 parent 0aa5c0c98b
commit 92df9a378c
7 files changed
+66 -44

No files matched your search

+7
View File
@@ -1,6 +1,7 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'
import jwtDecode from 'jwt-decode'
import { withStyles } from '@material-ui/core/styles'
import withWidth from '@material-ui/core/withWidth'
@@ -45,6 +46,12 @@ class Header extends Component {
let { classes, auth, width } = this.props
let { open } = this.state
if (window.localStorage.getItem('access_token')) {
if (jwtDecode(window.localStorage.getItem('access_token')).exp < new Date().getTime() / 1000) {
window.localStorage.clear()
window.location.reload()
}
}
let user = JSON.parse(this.state.user)
const menus = allMenus.map((menu, index) => {
+2 -2
View File
@@ -33,7 +33,7 @@ class Home extends Component {
<main className={classes.layout}>
<div className={classes.heroContent}>
<Typography
variant='display3'
variant='h2'
align='center'
color='textPrimary'
gutterBottom
@@ -41,7 +41,7 @@ class Home extends Component {
Collaborate. Innovate. Evolve.
</Typography>
<Typography
variant='title'
variant='h6'
align='center'
color='textSecondary'
component='h3'