API & Client: Profile picture

This commit is contained in:
SamR1
2018-01-01 21:54:03 +01:00
parent 8e21fc4112
commit ddb765e02d
14 changed files with 293 additions and 8 deletions

View File

@ -2,6 +2,9 @@ import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import mpwoApi from '../../mpwoApi'
function NavBar (props) {
return (
<header>
@ -56,6 +59,14 @@ function NavBar (props) {
</Link>
</li>
)}
{props.user.picture === true && (
<img
alt="Profile"
src={`${mpwoApi.getApiUrl()}users/${props.user.id}/picture` +
`?${Date.now()}`}
className="img-fluid App-nav-profile-img"
/>
)}
{props.user.isAuthenticated && (
<li className="nav-item">
<Link