chore(clerk-js): Use userMemberships instead of organizationList inside OrganizationSwitcher#2118
Conversation
…inside `OrganizationSwitcher`
🦋 Changeset detectedLatest commit: 5c4242d The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| /> | ||
| </PreviewButton> | ||
| ))} | ||
| {(hasNextPage || isLoading) && <InfiniteListSpinner ref={ref} />} |
There was a problem hiding this comment.
❓ are we sure about showing the InfiniteListSpinner when hasNextPage is true?
There was a problem hiding this comment.
So we've been following this pattern for a while, i believe this just improves the UI in general by minimizing layout shifts when the loading get triggered.
F.e.: You scroll, u are about to reach the bottom and u see a spinner, the spinner triggers the request (to fetch the next page) and u continue to see the spinner until loading is completed, now the spinner is pushed further now and no requests will fire until it is in the users viewport again.
Description
This PR replaces the deprecated usage of
organizationListfrom useOrganizationList withuserMembershipsthat is returned from the same hook.This PR also unblocks #2102
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore