Skip to content

Commit b6b1245

Browse files
fix(mobile): avoid duplicate Settings back buttons on iPad
1 parent fe941c7 commit b6b1245

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

‎apps/mobile/src/features/settings/SettingsRouteScreen.tsx‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
77

88
import { hasCloudPublicConfig } from "../cloud/publicConfig";
99
import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
10-
import { NativeHeaderToolbar } from "../../native/StackHeader";
10+
import { NativeHeaderToolbar, NativeStackScreenOptions } from "../../native/StackHeader";
1111
import { useSavedRemoteConnections } from "../../state/use-remote-environment-registry";
1212
import { SettingsRow } from "./components/SettingsRow";
1313
import { SettingsSection } from "./components/SettingsSection";
@@ -30,13 +30,16 @@ export function SettingsRouteScreen() {
3030
return (
3131
<>
3232
{Platform.OS === "ios" && layout.usesSplitView ? (
33-
<NativeHeaderToolbar placement="left">
34-
<NativeHeaderToolbar.Button
35-
accessibilityLabel="Go back"
36-
icon="chevron.left"
37-
onPress={() => navigation.goBack()}
38-
/>
39-
</NativeHeaderToolbar>
33+
<>
34+
<NativeStackScreenOptions options={{ headerBackVisible: false }} />
35+
<NativeHeaderToolbar placement="left">
36+
<NativeHeaderToolbar.Button
37+
accessibilityLabel="Go back"
38+
icon="chevron.left"
39+
onPress={() => navigation.goBack()}
40+
/>
41+
</NativeHeaderToolbar>
42+
</>
4043
) : null}
4144
<SettingsEnvironmentFilterHeader closeSettings />
4245
{Platform.OS === "android" ? (

0 commit comments

Comments
 (0)