diff --git a/src/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index 22e54670c264..f9dfcb803d8a 100644 --- a/src/components/ScreenWrapper.tsx +++ b/src/components/ScreenWrapper.tsx @@ -40,6 +40,9 @@ type ScreenWrapperProps = { /** Returns a function as a child to pass insets to or a node to render without insets */ children: ReactNode | React.FC; + /** Content to display under the offline indicator */ + bottomContent?: ReactNode; + /** A unique ID to find the screen wrapper in tests */ testID: string; @@ -131,6 +134,7 @@ function ScreenWrapper( shouldShowOfflineIndicatorInWideScreen = false, shouldUseCachedViewportHeight = false, focusTrapSettings, + bottomContent, }: ScreenWrapperProps, ref: ForwardedRef, ) { @@ -305,6 +309,7 @@ function ScreenWrapper( )} + {bottomContent} diff --git a/src/components/StateSelector.tsx b/src/components/StateSelector.tsx index e2be9281d0bb..5248af98cfac 100644 --- a/src/components/StateSelector.tsx +++ b/src/components/StateSelector.tsx @@ -91,7 +91,7 @@ function StateSelector( onPress={() => { const activeRoute = Navigation.getActiveRoute(); didOpenStateSelector.current = true; - Navigation.navigate(stateSelectorRoute.getRoute(stateCode, activeRoute, label)); + Navigation.goUp(stateSelectorRoute.getRoute(stateCode, activeRoute, label), {compareParams: false}); }} wrapperStyle={wrapperStyle} /> diff --git a/src/pages/Search/SearchPageBottomTab.tsx b/src/pages/Search/SearchPageBottomTab.tsx index ee73a1b5f8aa..e0f1124a39d1 100644 --- a/src/pages/Search/SearchPageBottomTab.tsx +++ b/src/pages/Search/SearchPageBottomTab.tsx @@ -89,6 +89,7 @@ function SearchPageBottomTab({queryJSON, policyID, searchName}: SearchPageBottom } > {!selectionMode?.isEnabled ? ( <> @@ -121,7 +122,6 @@ function SearchPageBottomTab({queryJSON, policyID, searchName}: SearchPageBottom onSearchListScroll={scrollHandler} contentContainerStyle={!selectionMode?.isEnabled ? [styles.searchListContentContainerStyles] : undefined} /> - ); } diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx index 0dbd5b418c34..6a97c3a66612 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx @@ -50,6 +50,7 @@ function BaseSidebarScreen() { shouldEnableKeyboardAvoidingView={false} style={[styles.sidebar, Browser.isMobile() ? styles.userSelectNone : {}]} testID={BaseSidebarScreen.displayName} + bottomContent={} > {({insets}) => ( <> @@ -64,7 +65,6 @@ function BaseSidebarScreen() { insets={insets} /> - )} diff --git a/src/pages/settings/InitialSettingsPage.tsx b/src/pages/settings/InitialSettingsPage.tsx index 410168f70b60..de196e4e75d8 100755 --- a/src/pages/settings/InitialSettingsPage.tsx +++ b/src/pages/settings/InitialSettingsPage.tsx @@ -411,6 +411,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr } > {headerContent} toggleSignoutConfirmModal(false)} /> - ); } diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index cd0e243708e3..777f690a9c5f 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -372,6 +372,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac } > - ); diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 388b75e5286e..e47436ab5a8a 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -378,6 +378,7 @@ function WorkspacesListPage() { shouldEnableMaxHeight testID={WorkspacesListPage.displayName} shouldShowOfflineIndicatorInWideScreen + bottomContent={shouldUseNarrowLayout && } > - {shouldUseNarrowLayout && } ); } @@ -415,6 +415,7 @@ function WorkspacesListPage() { shouldEnablePickerAvoiding={false} shouldShowOfflineIndicatorInWideScreen testID={WorkspacesListPage.displayName} + bottomContent={shouldUseNarrowLayout && } > - {shouldUseNarrowLayout && } ); }