Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/olive-zebras-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@clerk/clerk-react': patch
'@clerk/vue': patch
---

Add deprecation notices for the following components:

- `RedirectToUserProfile`
- `RedirectToOrganizationProfile`
- `RedirectToCreateOrganization`
13 changes: 13 additions & 0 deletions packages/react/src/components/controlComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { deprecated } from '@clerk/shared/deprecated';
import type {
CheckAuthorizationWithCustomPermissions,
HandleOAuthCallbackParams,
Expand Down Expand Up @@ -164,24 +165,36 @@ export const RedirectToSignUp = withClerk(({ clerk, ...props }: WithClerkProp<Re
return null;
}, 'RedirectToSignUp');

/**
* @deprecated Use [`redirectToUserProfile()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-user-profile) instead, will be removed in the next major version.
*/
export const RedirectToUserProfile = withClerk(({ clerk }) => {
React.useEffect(() => {
deprecated('RedirectToUserProfile', 'Use the `redirectToUserProfile()` method instead.');
void clerk.redirectToUserProfile();
}, []);

return null;
}, 'RedirectToUserProfile');

/**
* @deprecated Use [`redirectToOrganizationProfile()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-organization-profile) instead, will be removed in the next major version.
*/
export const RedirectToOrganizationProfile = withClerk(({ clerk }) => {
React.useEffect(() => {
deprecated('RedirectToOrganizationProfile', 'Use the `redirectToOrganizationProfile()` method instead.');
void clerk.redirectToOrganizationProfile();
}, []);

return null;
}, 'RedirectToOrganizationProfile');

/**
* @deprecated Use [`redirectToCreateOrganization()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-create-organization) instead, will be removed in the next major version.
*/
export const RedirectToCreateOrganization = withClerk(({ clerk }) => {
React.useEffect(() => {
deprecated('RedirectToCreateOrganization', 'Use the `redirectToCreateOrganization()` method instead.');
void clerk.redirectToCreateOrganization();
}, []);

Expand Down
13 changes: 13 additions & 0 deletions packages/vue/src/components/controlComponents.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { deprecated } from '@clerk/shared/deprecated';
import type {
CheckAuthorizationWithCustomPermissions,
HandleOAuthCallbackParams as HandleOAuthCallbackParamsOriginal,
Expand Down Expand Up @@ -60,24 +61,36 @@ export const RedirectToSignUp = defineComponent((props: RedirectOptions) => {
return () => null;
});

/**
* @deprecated Use [`redirectToUserProfile()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-user-profile) instead, will be removed in the next major version.
*/
export const RedirectToUserProfile = defineComponent(() => {
useClerkLoaded(clerk => {
deprecated('RedirectToUserProfile', 'Use the `redirectToUserProfile()` method instead.');
void clerk.redirectToUserProfile();
});

return () => null;
});

/**
* @deprecated Use [`redirectToOrganizationProfile()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-organization-profile) instead, will be removed in the next major version.
*/
export const RedirectToOrganizationProfile = defineComponent(() => {
useClerkLoaded(clerk => {
deprecated('RedirectToOrganizationProfile', 'Use the `redirectToOrganizationProfile()` method instead.');
void clerk.redirectToOrganizationProfile();
});

return () => null;
});

/**
* @deprecated Use [`redirectToCreateOrganization()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-create-organization) instead, will be removed in the next major version.
*/
export const RedirectToCreateOrganization = defineComponent(() => {
useClerkLoaded(clerk => {
deprecated('RedirectToCreateOrganization', 'Use the `redirectToCreateOrganization()` method instead.');
void clerk.redirectToCreateOrganization();
});

Expand Down
Loading