Skip to content

Commit

Permalink
add a check if selected item is clicked or not
Browse files Browse the repository at this point in the history
  • Loading branch information
sahil143 committed Dec 20, 2022
1 parent 7795d33 commit 10dd8e4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ApplicationSwitcher: React.FC<{ selectedApplication?: string }> = (
const selectedItem = menuItems.find((item) => item.key === selectedApplication);

const onSelect = (item: ContextMenuItem) => {
navigate(`/stonesoup/applications/${item.key}`);
selectedItem.key !== item.key && navigate(`/stonesoup/applications/${item.key}`);
};

return menuItems.length > 1 ? (
Expand Down

0 comments on commit 10dd8e4

Please sign in to comment.