diff --git a/CHANGELOG.md b/CHANGELOG.md index e3b6b568..e4d8a7d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ * Change Help icon aria label to just Help in MainNav component. Refs STCOR-931. * *BREAKING* remove token-based authentication code. Refs STCOR-918. * *BREAKING* replace useSecureTokens conditionalsRefs STCOR-922. +* Added `location` to a hook in `` to fix comparing old `location` value. Fixes STCOR-950. ## [10.2.0](https://github.com/folio-org/stripes-core/tree/v10.2.0) (2024-10-11) [Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.1.1...v10.2.0) diff --git a/src/components/MainNav/MainNav.js b/src/components/MainNav/MainNav.js index ea49d7fb..c8caf92e 100644 --- a/src/components/MainNav/MainNav.js +++ b/src/components/MainNav/MainNav.js @@ -69,7 +69,7 @@ const MainNav = () => { return () => { _unsubscribe(); }; - }, []); // eslint-disable-line + }, [location]); // eslint-disable-line // if the location changes, we need to update the current module/query resource. // This logic changes the visible current app at the starting side of the Main Navigation.