diff --git a/.changeset/thin-moles-obey.md b/.changeset/thin-moles-obey.md new file mode 100644 index 0000000000..5e154ea690 --- /dev/null +++ b/.changeset/thin-moles-obey.md @@ -0,0 +1,9 @@ +--- +'@clerk/localizations': patch +'@clerk/clerk-js': patch +'@clerk/shared': patch +'@clerk/types': patch +--- + +Introduces list of suggestions within ++ Users can request to join a suggested organization diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/VerifiedDomainPage.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/VerifiedDomainPage.tsx index 6d3725f55e..b2d84e9ef5 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/VerifiedDomainPage.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/VerifiedDomainPage.tsx @@ -26,6 +26,10 @@ export const VerifiedDomainPage = withCardStateProvider(() => { const enrollmentMode = useFormControl('enrollmentMode', '', { type: 'radio', radioOptions: [ + { + value: 'automatic_suggestion', + label: 'Automatic suggestion', + }, { value: 'automatic_invitation', // TODO: Add labels diff --git a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcher.tsx b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcher.tsx index b318712736..f959c37f0c 100644 --- a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcher.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcher.tsx @@ -12,10 +12,16 @@ const _OrganizationSwitcher = withFloatingTree(() => { offset: 8, }); + /** + * Prefetch user invitations and suggestions + */ useCoreOrganizationList({ userInvitations: { infinite: true, }, + userSuggestions: { + infinite: true, + }, }); return ( diff --git a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OtherOrganizationActions.tsx b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OtherOrganizationActions.tsx index 1acae81650..172f0b8b9f 100644 --- a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OtherOrganizationActions.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OtherOrganizationActions.tsx @@ -7,6 +7,7 @@ import { Action, SecondaryActions } from '../../elements'; import { UserInvitationList } from './UserInvitationList'; import type { UserMembershipListProps } from './UserMembershipList'; import { UserMembershipList } from './UserMembershipList'; +import { UserSuggestionList } from './UserSuggestionList'; export interface OrganizationActionListProps extends UserMembershipListProps { onCreateOrganizationClick: React.MouseEventHandler; @@ -45,6 +46,7 @@ export const OrganizationActionList = (props: OrganizationActionListProps) => { + ); diff --git a/packages/clerk-js/src/ui/components/OrganizationSwitcher/UserInvitationList.tsx b/packages/clerk-js/src/ui/components/OrganizationSwitcher/UserInvitationList.tsx index 966640ffe5..b175e26a60 100644 --- a/packages/clerk-js/src/ui/components/OrganizationSwitcher/UserInvitationList.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationSwitcher/UserInvitationList.tsx @@ -117,16 +117,15 @@ const AcceptRejectInvitationButtons = (props: UserOrganizationInvitationResource }; return ( - <> -