Skip to content
Merged
Show file tree
Hide file tree
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: 4 additions & 1 deletion src/components/Navigation/NavigationTabBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import reportsSelector from '@selectors/Attributes';
import React, {memo, useCallback, useEffect, useState} from 'react';
import {View} from 'react-native';
import type {ValueOf} from 'type-fest';
import FloatingCameraButton from '@components/FloatingCameraButton';
import HeaderGap from '@components/HeaderGap';
import Icon from '@components/Icon';
import ImageSVG from '@components/ImageSVG';
Expand Down Expand Up @@ -46,9 +47,10 @@ import NAVIGATION_TABS from './NAVIGATION_TABS';
type NavigationTabBarProps = {
selectedTab: ValueOf<typeof NAVIGATION_TABS>;
isTopLevelBar?: boolean;
shouldShowFloatingCameraButton?: boolean;
};

function NavigationTabBar({selectedTab, isTopLevelBar = false}: NavigationTabBarProps) {
function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatingCameraButton = true}: NavigationTabBarProps) {
const theme = useTheme();
const styles = useThemeStyles();

Expand Down Expand Up @@ -448,6 +450,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false}: NavigationTabBar
onPress={navigateToSettings}
/>
</View>
{shouldShowFloatingCameraButton && <FloatingCameraButton />}
</>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {ParamListBase} from '@react-navigation/native';
import React, {useContext, useEffect, useRef, useState} from 'react';
import {InteractionManager, View} from 'react-native';
import FloatingCameraButton from '@components/FloatingCameraButton';
import {FullScreenBlockingViewContext} from '@components/FullScreenBlockingViewContextProvider';
import NavigationTabBar from '@components/Navigation/NavigationTabBar';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
Expand Down Expand Up @@ -75,7 +74,6 @@ function TopLevelNavigationTabBar({state}: TopLevelNavigationTabBarProps) {
selectedTab={selectedTab}
isTopLevelBar
/>
<FloatingCameraButton />
</View>
);
}
Expand Down
10 changes: 9 additions & 1 deletion src/pages/workspace/WorkspaceInitialPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,15 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
<ScreenWrapper
testID={WorkspaceInitialPage.displayName}
enableEdgeToEdgeBottomSafeAreaPadding={false}
bottomContent={shouldShowNavigationTabBar && !shouldDisplayLHB && <NavigationTabBar selectedTab={NAVIGATION_TABS.WORKSPACES} />}
bottomContent={
shouldShowNavigationTabBar &&
!shouldDisplayLHB && (
<NavigationTabBar
selectedTab={NAVIGATION_TABS.WORKSPACES}
shouldShowFloatingCameraButton={false}
/>
)
}
>
<FullPageNotFoundView
onBackButtonPress={Navigation.dismissModal}
Expand Down
18 changes: 16 additions & 2 deletions src/pages/workspace/WorkspacesListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
}
/>
),
[StyleUtils, styles, translate],

Check warning on line 633 in src/pages/workspace/WorkspacesListPage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

React Hook useCallback has a missing dependency: 'isRestrictedPolicyCreation'. Either include it or remove the dependency array
);

const onBackButtonPress = () => {
Expand Down Expand Up @@ -691,7 +691,14 @@
shouldEnableMaxHeight
testID={WorkspacesListPage.displayName}
shouldShowOfflineIndicatorInWideScreen
bottomContent={shouldUseNarrowLayout && <NavigationTabBar selectedTab={NAVIGATION_TABS.WORKSPACES} />}
bottomContent={
shouldUseNarrowLayout && (
<NavigationTabBar
selectedTab={NAVIGATION_TABS.WORKSPACES}
shouldShowFloatingCameraButton={false}
/>
)
}
enableEdgeToEdgeBottomSafeAreaPadding={false}
>
<View style={styles.topBarWrapper}>
Expand All @@ -715,7 +722,14 @@
shouldShowOfflineIndicatorInWideScreen
testID={WorkspacesListPage.displayName}
enableEdgeToEdgeBottomSafeAreaPadding={false}
bottomContent={shouldUseNarrowLayout && <NavigationTabBar selectedTab={NAVIGATION_TABS.WORKSPACES} />}
bottomContent={
shouldUseNarrowLayout && (
<NavigationTabBar
selectedTab={NAVIGATION_TABS.WORKSPACES}
shouldShowFloatingCameraButton={false}
/>
)
}
>
<View style={styles.flex1}>
<TopBar breadcrumbLabel={translate('common.workspaces')}>{!shouldUseNarrowLayout && <View style={[styles.pr2]}>{getHeaderButton()}</View>}</TopBar>
Expand Down
Loading