Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/WideRHPContextProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ function WideRHPContextProvider({children}: React.PropsWithChildren) {
return false;
}

if (isRHPLastRootRoute && focusedRoute.name !== SCREENS.SEARCH.REPORT_RHP) {
return !!state?.routes.at(-1)?.state?.routes.find((route) => route.name === SCREENS.RIGHT_MODAL.SEARCH_REPORT);
// Check the focused route to avoid glitching when quickly close and open RHP.
if (wideRHPRouteKeys.length > 0 && !wideRHPRouteKeys.includes(focusedRoute.key) && isRHPLastRootRoute && focusedRoute.name !== SCREENS.SEARCH.REPORT_RHP) {
return true;
}

return false;
Expand Down
Loading