Skip to content

Commit

Permalink
add comments to Main Nav for updating the selectedApp on location change
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnC-80 committed Feb 12, 2025
1 parent 29db12d commit c0d5296
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/MainNav/MainNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ const MainNav = () => {
};
}, []); // 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.
useEffect(() => {
setSelectedApp(apps.find(entry => entry.active));
const nextCurModule = getCurrentModule(modules, location);
Expand Down

0 comments on commit c0d5296

Please sign in to comment.