Skip to content

Commit af281c9

Browse files
fix(mobile): repair Clerk auth navigation headers (#5140)
Co-authored-by: codex <codex@users.noreply.github.com>
1 parent bd422fd commit af281c9

3 files changed

Lines changed: 48 additions & 46 deletions

File tree

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useAuth } from "@clerk/expo";
22
import { AuthView, UserProfileView } from "@clerk/expo/native";
33
import { StackActions, useNavigation } from "@react-navigation/native";
44
import { NativeStackScreenOptions } from "../../native/StackHeader";
5-
import { useEffect } from "react";
5+
import { useCallback, useEffect } from "react";
66
import { View } from "react-native";
77

88
import { hasCloudPublicConfig } from "../cloud/publicConfig";
@@ -21,16 +21,18 @@ export function SettingsAuthRouteScreen() {
2121

2222
function ConfiguredSettingsAuthRouteScreen() {
2323
const { isLoaded, isSignedIn } = useAuth({ treatPendingAsSignedOut: false });
24+
const navigation = useNavigation();
25+
const handleHostBack = useCallback(() => navigation.goBack(), [navigation]);
2426

2527
return (
2628
<>
27-
<NativeStackScreenOptions options={{ title: isSignedIn ? "Account" : "Sign in" }} />
29+
<NativeStackScreenOptions options={{ headerShown: false }} />
2830
<View collapsable={false} className="flex-1 overflow-hidden bg-sheet">
2931
{isLoaded ? (
3032
isSignedIn ? (
31-
<UserProfileView isDismissible={false} />
33+
<UserProfileView isDismissible={false} onHostBack={handleHostBack} />
3234
) : (
33-
<AuthView isDismissible={false} />
35+
<AuthView isDismissible={false} onHostBack={handleHostBack} />
3436
)
3537
) : null}
3638
</View>

‎pnpm-lock.yaml‎

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ allowBuilds:
2424

2525
catalog:
2626
"@clerk/backend": 3.14.0
27-
"@clerk/clerk-js": 6.25.12
27+
"@clerk/clerk-js": 6.25.13
2828
"@clerk/electron": 0.0.24
2929
"@clerk/electron-passkeys": 0.0.3
30-
"@clerk/expo": 4.1.2
31-
"@clerk/react": 6.12.9
32-
"@clerk/shared": 4.25.9
30+
"@clerk/expo": 4.2.0
31+
"@clerk/react": 6.12.10
32+
"@clerk/shared": 4.25.10
3333
"@effect/atom-react": 4.0.0-beta.103
3434
"@effect/openapi-generator": 4.0.0-beta.103
3535
"@effect/platform-bun": 4.0.0-beta.103
@@ -53,11 +53,11 @@ catalog:
5353

5454
minimumReleaseAgeExclude:
5555
- "@clerk/backend@3.14.0"
56-
- "@clerk/clerk-js@6.25.12"
56+
- "@clerk/clerk-js@6.25.13"
5757
- "@clerk/electron@0.0.24"
58-
- "@clerk/expo@4.1.2"
59-
- "@clerk/react@6.12.9"
60-
- "@clerk/shared@4.25.9"
58+
- "@clerk/expo@4.2.0"
59+
- "@clerk/react@6.12.10"
60+
- "@clerk/shared@4.25.10"
6161
- "@distilled.cloud/aws@0.30.2"
6262
- "@distilled.cloud/axiom@0.30.2"
6363
- "@distilled.cloud/cloudflare@0.30.2"

0 commit comments

Comments
 (0)