handle case where user hasn't loaded yet
This commit is contained in:
parent
714e76e89e
commit
44d72200d4
1 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ const MapLink = props => {
|
|||
|
||||
class Header extends Component {
|
||||
render = () => {
|
||||
const { signedIn, section } = this.props
|
||||
const { signedIn, section, user } = this.props
|
||||
|
||||
const activeClass = (title) => {
|
||||
let forClass = 'exploreMapsButton'
|
||||
|
@ -65,8 +65,8 @@ class Header extends Component {
|
|||
|
||||
{mapper ? (
|
||||
<div className='exploreMapsButton active mapperButton'>
|
||||
<img className='exploreMapperImage' width='24' height='24' src={this.props.user.image} />
|
||||
<div className='exploreMapperName'>{this.props.user.name}’s Maps</div>
|
||||
{user && <img className='exploreMapperImage' width='24' height='24' src={user.image} />}
|
||||
{user && <div className='exploreMapperName'>{user.name}’s Maps</div>}
|
||||
<div className='clearfloat'></div>
|
||||
</div>
|
||||
) : null }
|
||||
|
|
Loading…
Add table
Reference in a new issue