We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bb6a46 commit 0307ea8Copy full SHA for 0307ea8
.changeset/little-buttons-try.md
@@ -0,0 +1,21 @@
1
+---
2
+"@clerk/astro": patch
3
+"@clerk/clerk-js": patch
4
+"@clerk/clerk-react": patch
5
+"@clerk/vue": patch
6
7
+
8
+Allow reordering API Keys and Billing pages in `<UserProfile />` and `<OrganizationProfile />`.
9
10
+Example:
11
12
+```tsx
13
+export function CustomUserProfile() {
14
+ return (
15
+ <UserProfile>
16
+ <UserProfile.Page label="apiKeys" />
17
+ <UserProfile.Page label="billing" />
18
+ </UserProfile>
19
+ )
20
+}
21
+```
packages/astro/src/astro-components/interactive/OrganizationProfile/OrganizationProfilePage.astro
@@ -1,7 +1,7 @@
---
import CustomProfilePageRenderer from '../CustomProfilePageRenderer.astro';
-const reorderItemsLabels = ['general', 'members'] as const;
+const reorderItemsLabels = ['general', 'members', 'billing', 'apiKeys'] as const;
type ReorderItemsLabels = (typeof reorderItemsLabels)[number];
type Props<Label extends string> = {
packages/astro/src/astro-components/interactive/OrganizationSwitcher/OrganizationProfilePage.astro
packages/astro/src/astro-components/interactive/UserProfile/UserProfilePage.astro
-const reorderItemsLabels = ['account', 'security'] as const;
+const reorderItemsLabels = ['account', 'security', 'billing', 'apiKeys'] as const;
packages/clerk-js/src/ui/utils/createCustomPages.tsx
@@ -22,7 +22,7 @@ export type CustomPageContent = {
22
};
23
24
type ProfileReorderItem = {
25
- label: 'account' | 'security' | 'members' | 'general';
+ label: 'account' | 'security' | 'members' | 'general' | 'billing' | 'apiKeys';
26
27
28
type ProfileCustomPage = {
packages/react/src/types.ts
@@ -131,15 +131,15 @@ type PageProps<T extends string> =
131
labelIcon?: never;
132
133
134
-export type UserProfilePageProps = PageProps<'account' | 'security'>;
+export type UserProfilePageProps = PageProps<'account' | 'security' | 'billing' | 'apiKeys'>;
135
136
export type UserProfileLinkProps = {
137
url: string;
138
label: string;
139
labelIcon: React.ReactNode;
140
141
142
-export type OrganizationProfilePageProps = PageProps<'general' | 'members'>;
+export type OrganizationProfilePageProps = PageProps<'general' | 'members' | 'billing' | 'apiKeys'>;
143
export type OrganizationProfileLinkProps = UserProfileLinkProps;
144
145
type ButtonActionProps<T extends string> =
packages/react/src/utils/useCustomPages.tsx
@@ -20,7 +20,7 @@ export const useUserProfileCustomPages = (
children: React.ReactNode | React.ReactNode[],
options?: UseCustomPagesOptions,
) => {
- const reorderItemsLabels = ['account', 'security'];
+ const reorderItemsLabels = ['account', 'security', 'billing', 'apiKeys'];
return useCustomPages(
{
children,
@@ -38,7 +38,7 @@ export const useOrganizationProfileCustomPages = (
38
39
40
41
- const reorderItemsLabels = ['general', 'members'];
+ const reorderItemsLabels = ['general', 'members', 'billing', 'apiKeys'];
42
43
44
packages/vue/src/types.ts
@@ -83,14 +83,14 @@ type PageProps<T extends string> =
83
url?: never;
84
85
86
87
88
89
90
91
92
93
94
95
export type OrganizationLinkProps = {
96
packages/vue/src/utils/useCustomPages.ts
@@ -12,7 +12,7 @@ import { useCustomElementPortal } from './useCustomElementPortal';
export const useUserProfileCustomPages = () => {
const { customPages, customPagesPortals, addCustomPage } = useCustomPages({
- reorderItemsLabels: ['account', 'security'],
+ reorderItemsLabels: ['account', 'security', 'billing', 'apiKeys'],
PageComponent: UserProfilePage,
LinkComponent: UserProfileLink,
componentName: 'UserProfile',
@@ -31,7 +31,7 @@ export const useUserProfileCustomPages = () => {
31
32
export const useOrganizationProfileCustomPages = () => {
33
34
- reorderItemsLabels: ['general', 'members'],
+ reorderItemsLabels: ['general', 'members', 'billing', 'apiKeys'],
35
PageComponent: OrganizationProfilePage,
36
LinkComponent: OrganizationProfileLink,
37
componentName: 'OrganizationProfile',
0 commit comments