Skip to content

Commit 7bae614

Browse files
committed
Update changeset
1 parent d6842a1 commit 7bae614

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.changeset/whole-knives-attend.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ Add `taskUrls` option to customize task flow URLs:
1212
}}
1313
/>
1414
```
15-
16-
**Breaking**: Task key renamed from `'select-organization'` to `'org'`.

packages/clerk-js/src/core/sessionTasks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function navigateToTask(
2727
routeKey: keyof typeof INTERNAL_SESSION_TASK_ROUTE_BY_KEY,
2828
{ componentNavigationContext, globalNavigate, options, environment }: NavigateToTaskOptions,
2929
) {
30-
const taskRoute = options.taskUrls?.[routeKey] ?? `/tasks/${INTERNAL_SESSION_TASK_ROUTE_BY_KEY[routeKey]}`;
30+
const taskRoute = `/tasks/${INTERNAL_SESSION_TASK_ROUTE_BY_KEY[routeKey]}`;
3131

3232
if (componentNavigationContext) {
3333
return componentNavigationContext.navigate(componentNavigationContext.indexPath + taskRoute);
@@ -45,5 +45,5 @@ export function navigateToTask(
4545
{ stringify: true },
4646
);
4747

48-
return globalNavigate(sessionTaskUrl);
48+
return globalNavigate(options.taskUrls?.[routeKey] ?? sessionTaskUrl);
4949
}

packages/clerk-js/src/ui/common/redirects.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ export function buildSessionTaskRedirectUrl({
4343
return null;
4444
}
4545

46-
return buildRedirectUrl({
47-
routing,
48-
baseUrl,
49-
path,
50-
endpoint: taskUrls?.[task.key] ?? `/tasks/${INTERNAL_SESSION_TASK_ROUTE_BY_KEY[task.key]}`,
51-
authQueryString: null,
52-
});
46+
return (
47+
taskUrls?.[task.key] ??
48+
buildRedirectUrl({
49+
routing,
50+
baseUrl,
51+
path,
52+
endpoint: `/tasks/${INTERNAL_SESSION_TASK_ROUTE_BY_KEY[task.key]}`,
53+
authQueryString: null,
54+
})
55+
);
5356
}
5457

5558
export function buildSSOCallbackURL(

0 commit comments

Comments
 (0)