From 455d77d0fb75dad0d754a4101d92b26e3ded82f4 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Wed, 16 May 2018 17:35:03 +1000 Subject: [PATCH] Fixed Navbar state not updating on route change --- public/nav/navbar/Navbar.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/nav/navbar/Navbar.jsx b/public/nav/navbar/Navbar.jsx index a7708cd..6dfc0fd 100644 --- a/public/nav/navbar/Navbar.jsx +++ b/public/nav/navbar/Navbar.jsx @@ -22,6 +22,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import React from 'react'; +import { withRouter } from 'react-router'; import { connect } from 'react-redux'; import { NavLink } from 'react-router-dom' import PageBoundary from './../../page/PageBoundary'; @@ -57,7 +58,7 @@ class Navbar extends React.Component { - + @@ -71,4 +72,4 @@ const mapStateToProps = function(state) { } } -export default connect(mapStateToProps)(Navbar); +export default withRouter(connect(mapStateToProps)(Navbar));