diff --git a/client/src/client-only-routes/ShowProfileOrFourOhFour.js b/client/src/client-only-routes/ShowProfileOrFourOhFour.js index 58d07fe2ef..70940fe10b 100644 --- a/client/src/client-only-routes/ShowProfileOrFourOhFour.js +++ b/client/src/client-only-routes/ShowProfileOrFourOhFour.js @@ -13,6 +13,7 @@ import { } from '../redux'; import FourOhFourPage from '../components/FourOhFour'; import Profile from '../components/profile/Profile'; +import { isBrowser } from '../../utils/index'; const propTypes = { fetchProfileForUser: PropTypes.func.isRequired, @@ -45,16 +46,19 @@ const makeMapStateToProps = () => (state, props) => { const mapDispatchToProps = dispatch => bindActionCreators({ fetchProfileForUser }, dispatch); -class ShowFourOhFour extends Component { +class ShowProfileOrFourOhFour extends Component { componentDidMount() { const { requestedUser, maybeUser, fetchProfileForUser } = this.props; if (isEmpty(requestedUser)) { - return fetchProfileForUser(maybeUser); + fetchProfileForUser(maybeUser); } - return null; } render() { + if (!isBrowser()) { + return null; + } + const { isSessionUser, requestedUser, showLoading } = this.props; if (isEmpty(requestedUser)) { if (showLoading) { @@ -74,10 +78,10 @@ class ShowFourOhFour extends Component { } } -ShowFourOhFour.displayName = 'ShowFourOhFour'; -ShowFourOhFour.propTypes = propTypes; +ShowProfileOrFourOhFour.displayName = 'ShowProfileOrFourOhFour'; +ShowProfileOrFourOhFour.propTypes = propTypes; export default connect( makeMapStateToProps, mapDispatchToProps -)(ShowFourOhFour); +)(ShowProfileOrFourOhFour); diff --git a/client/src/components/FourOhFour/404.css b/client/src/components/FourOhFour/404.css index 938e908fab..00d9214eb5 100644 --- a/client/src/components/FourOhFour/404.css +++ b/client/src/components/FourOhFour/404.css @@ -9,7 +9,7 @@ } .notfound-page-wrapper img { - max-width: 380px; + width: 380px; margin-bottom: 1rem; }