import React from 'react'; import {withRouter} from 'react-router-dom'; import CoverPicture from './cover_pic'; import ProfilePicture from './profile_pic'; import Header from '../navbar/header_container'; class ProfilePage extends React.Component{ constructor(props){ super(props); } componentDidMount(){ this.props.fetchUser(this.props.match.params.userId); } render(){ let {user}=this.props; if (user === undefined){ return ""; }else{ return (