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
5 changes: 5 additions & 0 deletions .changeset/curvy-flowers-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/vue": patch
---

Remove `customPages` prop types from `<UserProfile />`, `<OrganizationProfile />` and `<UserButton />` to align with runtime behavior.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import type { OrganizationProfileProps } from '@clerk/types';
import { OrganizationProfileInjectionKey } from '../../../keys';
import { ClerkHostRenderer, CustomPortalsRenderer } from '../../ClerkHostRenderer';

const props = defineProps<OrganizationProfileProps>();
type Props = Omit<OrganizationProfileProps, 'customPages'>;
const props = defineProps<Props>();

const clerk = useClerk();

const { customPages, customPagesPortals, addCustomPage } = useOrganizationProfileCustomPages();

const finalProps = computed(() => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<script setup lang="ts">
import { useClerk } from '../../../composables';
import type { UserButtonProps } from '@clerk/types';
import type { UserButtonProps, UserProfileProps } from '@clerk/types';
import { ClerkHostRenderer, CustomPortalsRenderer } from '../../ClerkHostRenderer';
import { computed, provide } from 'vue';
import { UserButtonInjectionKey, UserProfileInjectionKey } from '../../../keys';
import { useUserProfileCustomPages } from '../../../utils/useCustomPages';
import { useUserButtonCustomMenuItems } from '../../../utils/useCustomMenuItems';

type Props = Omit<UserButtonProps, 'customMenuItems'>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Why did we not omit customMenuItems now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good catch, def missed that

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

type Props = Omit<UserButtonProps, 'userProfileProps' | 'customMenuItems'> & {
userProfileProps?: Pick<UserProfileProps, 'additionalOAuthScopes' | 'appearance'>;
};
const props = defineProps<Props>();

const clerk = useClerk();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { computed, provide } from 'vue';
import { UserProfileInjectionKey } from '../../../keys';
import { useUserProfileCustomPages } from '../../../utils/useCustomPages';

const props = defineProps<UserProfileProps>();
type Props = Omit<UserProfileProps, 'customPages'>;
const props = defineProps<Props>();

const clerk = useClerk();
const { customPages, customPagesPortals, addCustomPage } = useUserProfileCustomPages();
Expand Down