From ab8d6409565e7b0dcd5d1bf8ad049064c4ecc4b3 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 9 Jan 2019 12:45:05 +0100 Subject: [PATCH] refactor to avoid useless re-rendering in NavBar --- .../src/components/NavBar/index.jsx | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/fittrackee_client/src/components/NavBar/index.jsx b/fittrackee_client/src/components/NavBar/index.jsx index e9d2467e..9055e820 100644 --- a/fittrackee_client/src/components/NavBar/index.jsx +++ b/fittrackee_client/src/components/NavBar/index.jsx @@ -6,7 +6,7 @@ import { apiUrl } from '../../utils' class NavBar extends React.PureComponent { render() { - const { user } = this.props + const { id, isAuthenticated, picture, username } = this.props return (