-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clerk-js): Function or string literals in afterSelectPersonalUrl…
… and afterSelectOrganizationUrl
- Loading branch information
1 parent
a6363a3
commit 440127a
Showing
3 changed files
with
90 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
'@clerk/clerk-js': patch | ||
'@clerk/types': patch | ||
--- | ||
|
||
Construct urls based on context in <OrganizationSwitcher/> | ||
- Deprecate `afterSwitchOrganizationUrl` | ||
- Introduce `afterSelectOrganizationUrl` & `afterSelectPersonalUrl` | ||
|
||
`afterSelectOrganizationUrl` accepts | ||
- Full URL -> 'https://clerk.com/' | ||
- relative path -> '/organizations' | ||
- relative path -> with param '/organizations/:id' | ||
- function that returns a string -> (org) => `/org/${org.slug}` | ||
`afterSelectPersonalUrl` accepts | ||
- Full URL -> 'https://clerk.com/' | ||
- relative path -> '/users' | ||
- relative path -> with param '/users/:username' | ||
- function that returns a string -> (user) => `/users/${user.id}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters