Skip to content

Commit 4089ca4

Browse files
authored
chore(vue): Remove customPages prop types from UI components (#5101)
1 parent 767ac85 commit 4089ca4

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/vue": patch
3+
---
4+
5+
Remove `customPages` prop types from `<UserProfile />`, `<OrganizationProfile />` and `<UserButton />` to align with runtime behavior.

packages/vue/src/components/ui-components/OrganizationProfile/OrganizationProfile.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import type { OrganizationProfileProps } from '@clerk/types';
66
import { OrganizationProfileInjectionKey } from '../../../keys';
77
import { ClerkHostRenderer, CustomPortalsRenderer } from '../../ClerkHostRenderer';
88
9-
const props = defineProps<OrganizationProfileProps>();
9+
type Props = Omit<OrganizationProfileProps, 'customPages'>;
10+
const props = defineProps<Props>();
11+
1012
const clerk = useClerk();
13+
1114
const { customPages, customPagesPortals, addCustomPage } = useOrganizationProfileCustomPages();
1215
1316
const finalProps = computed(() => ({

packages/vue/src/components/ui-components/UserButton/UserButton.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<script setup lang="ts">
22
import { useClerk } from '../../../composables';
3-
import type { UserButtonProps } from '@clerk/types';
3+
import type { UserButtonProps, UserProfileProps } from '@clerk/types';
44
import { ClerkHostRenderer, CustomPortalsRenderer } from '../../ClerkHostRenderer';
55
import { computed, provide } from 'vue';
66
import { UserButtonInjectionKey, UserProfileInjectionKey } from '../../../keys';
77
import { useUserProfileCustomPages } from '../../../utils/useCustomPages';
88
import { useUserButtonCustomMenuItems } from '../../../utils/useCustomMenuItems';
99
10-
type Props = Omit<UserButtonProps, 'customMenuItems'>;
10+
type Props = Omit<UserButtonProps, 'userProfileProps' | 'customMenuItems'> & {
11+
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance'>;
12+
};
1113
const props = defineProps<Props>();
1214
1315
const clerk = useClerk();

packages/vue/src/components/ui-components/UserProfile/UserProfile.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { computed, provide } from 'vue';
66
import { UserProfileInjectionKey } from '../../../keys';
77
import { useUserProfileCustomPages } from '../../../utils/useCustomPages';
88
9-
const props = defineProps<UserProfileProps>();
9+
type Props = Omit<UserProfileProps, 'customPages'>;
10+
const props = defineProps<Props>();
1011
1112
const clerk = useClerk();
1213
const { customPages, customPagesPortals, addCustomPage } = useUserProfileCustomPages();

0 commit comments

Comments
 (0)