From 21a1f477d29cfcb8f4863479aa108a354bf57bbe Mon Sep 17 00:00:00 2001 From: Yehor Kharchenko Date: Mon, 17 Nov 2025 12:52:36 +0100 Subject: [PATCH] fix loading bar visibility when opening wide rhp --- src/components/Navigation/TopBar.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Navigation/TopBar.tsx b/src/components/Navigation/TopBar.tsx index 84eb0a5a8c6e..6e0607f2493b 100644 --- a/src/components/Navigation/TopBar.tsx +++ b/src/components/Navigation/TopBar.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useContext} from 'react'; import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; import LoadingBar from '@components/LoadingBar'; @@ -6,6 +6,7 @@ import {PressableWithoutFeedback} from '@components/Pressable'; import SearchButton from '@components/Search/SearchRouter/SearchButton'; import HelpButton from '@components/SidePanel/HelpComponents/HelpButton'; import Text from '@components/Text'; +import {WideRHPContext} from '@components/WideRHPContextProvider'; import useLoadingBarVisibility from '@hooks/useLoadingBarVisibility'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; @@ -33,6 +34,9 @@ function TopBar({breadcrumbLabel, shouldDisplaySearch = true, shouldDisplayHelpB const shouldShowLoadingBarForReports = useLoadingBarVisibility(); const isAnonymousUser = isAnonymousUserUtil(session); + const {wideRHPRouteKeys} = useContext(WideRHPContext); + const isWideRHPVisible = !!wideRHPRouteKeys.length; + const displaySignIn = isAnonymousUser; const displaySearch = !isAnonymousUser && shouldDisplaySearch; @@ -68,7 +72,7 @@ function TopBar({breadcrumbLabel, shouldDisplaySearch = true, shouldDisplayHelpB {shouldDisplayHelpButton && } {displaySearch && } - + ); }