diff --git a/src/components/TestToolMenu.tsx b/src/components/TestToolMenu.tsx index cb8072f2c22b3..d31450a022500 100644 --- a/src/components/TestToolMenu.tsx +++ b/src/components/TestToolMenu.tsx @@ -2,6 +2,7 @@ import React from 'react'; import useIsAuthenticated from '@hooks/useIsAuthenticated'; import useLocalize from '@hooks/useLocalize'; import useOnyx from '@hooks/useOnyx'; +import {useSidebarOrderedReports} from '@hooks/useSidebarOrderedReports'; import useThemeStyles from '@hooks/useThemeStyles'; import {isUsingStagingApi} from '@libs/ApiUtils'; import {setShouldFailAllRequests, setShouldForceOffline, setShouldSimulatePoorConnection} from '@userActions/Network'; @@ -23,6 +24,7 @@ function TestToolMenu() { const [isDebugModeEnabled = false] = useOnyx(ONYXKEYS.IS_DEBUG_MODE_ENABLED, {canBeMissing: true}); const styles = useThemeStyles(); const {translate} = useLocalize(); + const {clearLHNCache} = useSidebarOrderedReports(); // Check if the user is authenticated to show options that require authentication const isAuthenticated = useIsAuthenticated(); @@ -72,6 +74,15 @@ function TestToolMenu() { onPress={() => expireSessionWithDelay()} /> + + {/* Clears the useSidebarOrderedReports cache to re-compute from latest onyx values */} + +