Skip to content

Commit e1bd64c

Browse files
committed
Add @inline to SetActiveNavigate type
1 parent 97f3496 commit e1bd64c

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

packages/clerk-js/src/ui/components/SessionTasks/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const SessionTasks = withCardStateProvider(() => {
112112
return;
113113
}
114114

115-
return navigate(`./${currentTaskKey}`);
115+
return navigate(`./${INTERNAL_SESSION_TASK_ROUTE_BY_KEY[currentTaskKey]}`);
116116
};
117117

118118
return (

packages/clerk-js/src/ui/contexts/components/SignIn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { isAbsoluteUrl } from '@clerk/shared/url';
33
import type { SetActiveNavigate } from '@clerk/types';
44
import { createContext, useContext, useMemo } from 'react';
55

6-
import { buildTaskURL } from '@/core/sessionTasks';
6+
import { buildTaskURL, INTERNAL_SESSION_TASK_ROUTE_BY_KEY } from '@/core/sessionTasks';
77

88
import { SIGN_IN_INITIAL_VALUE_KEYS } from '../../../core/constants';
99
import { buildURL } from '../../../utils';
@@ -126,7 +126,7 @@ export const useSignInContext = (): SignInContextType => {
126126
return;
127127
}
128128

129-
return navigate(`../tasks/${currentTaskKey}`);
129+
return navigate(`../tasks/${INTERNAL_SESSION_TASK_ROUTE_BY_KEY[currentTaskKey]}`);
130130
};
131131

132132
const taskUrl = clerk.session?.currentTask

packages/clerk-js/src/ui/contexts/components/SignUp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { isAbsoluteUrl } from '@clerk/shared/url';
33
import type { SetActiveNavigate } from '@clerk/types';
44
import { createContext, useContext, useMemo } from 'react';
55

6-
import { buildTaskURL } from '@/core/sessionTasks';
6+
import { buildTaskURL, INTERNAL_SESSION_TASK_ROUTE_BY_KEY } from '@/core/sessionTasks';
77

88
import { SIGN_UP_INITIAL_VALUE_KEYS } from '../../../core/constants';
99
import { buildURL } from '../../../utils';
@@ -121,7 +121,7 @@ export const useSignUpContext = (): SignUpContextType => {
121121
return;
122122
}
123123

124-
return navigate(`../tasks/${currentTaskKey}`);
124+
return navigate(`../tasks/${INTERNAL_SESSION_TASK_ROUTE_BY_KEY[currentTaskKey]}`);
125125
};
126126

127127
const taskUrl = clerk.session?.currentTask

packages/types/src/clerk.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ type ClerkOptionsNavigation =
951951

952952
/**
953953
* A custom navigation function to be called just before the session and/or organization is set.
954+
* @inline
954955
*/
955956
export type SetActiveNavigate = ({ session }: { session: SessionResource }) => Promise<unknown>;
956957

0 commit comments

Comments
 (0)