Skip to content

Commit 34c36bb

Browse files
committed
fix: Correct imports and function type
1 parent 7a4025b commit 34c36bb

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

packages/ui/src/components/SignIn/SignInFactorOneCodeForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const SignInFactorOneCodeForm = (props: SignInFactorOneCodeFormProps) =>
3737
const card = useCardState();
3838
const { navigate } = useRouter();
3939
const ctx = useSignInContext();
40-
const { afterSignInUrl, afterSignUpUrl, signUpUrl, isCombinedFlow } = ctx;
40+
const { afterSignInUrl, afterSignUpUrl, signUpUrl, isCombinedFlow, navigateOnSetActive } = ctx;
4141
const { setActive } = useClerk();
4242
const { userSettings } = useEnvironment();
4343
const supportEmail = useSupportEmail();

packages/ui/src/components/SignIn/handleSignUpIfMissingTransfer.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@ export async function handleSignUpIfMissingTransfer({
4747
}
4848

4949
// Pending task: route to the task within the sign-in component using
50-
// an absolute URL built from signUpUrl.
50+
// an absolute URL built from signUpUrl. Wrap clerk.navigate to
51+
// normalize the return type, since the public LoadedClerk type
52+
// declares it as `Promise<unknown> | void`.
5153
await navigateIfTaskExists(session, {
5254
baseUrl: signUpUrl,
53-
navigate: clerk.navigate,
55+
navigate: async to => {
56+
await clerk.navigate(to);
57+
},
5458
});
5559
},
5660
});

0 commit comments

Comments
 (0)