diff --git a/src/screens/TopBar/RightHeader.tsx b/src/screens/TopBar/RightHeader.tsx index 0a1c75af..c77cfb9a 100644 --- a/src/screens/TopBar/RightHeader.tsx +++ b/src/screens/TopBar/RightHeader.tsx @@ -12,6 +12,7 @@ interface HeaderRightProps { const HeaderRight = ({ route, navigation }: HeaderRightProps) => { const currentLocation = useSelector((state: RootState) => state.mainReducer.currentLocation); + const loggedIn = useSelector((state: RootState) => state.mainReducer.loggedIn); const screensToHideMenu = ["Dashboard", "Choose Location"]; return ( @@ -21,7 +22,7 @@ const HeaderRight = ({ route, navigation }: HeaderRightProps) => { {currentLocation.name} )} - {!screensToHideMenu.includes(route.name) && ( + {loggedIn && !screensToHideMenu.includes(route.name) && ( )}