Skip to content

Commit

Permalink
Update docs/guides/force-organizations.mdx
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
  • Loading branch information
victoriaxyz and alexisintech authored Nov 13, 2024
1 parent 7f15593 commit df75441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guides/force-organizations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ This guide will be written for Next.js applications using App Router, but the sa

#### Set an active organization

In the case of [Clerk components](/docs/components/overview), an organization will _automatically_ be set as active each time the user creates an organization, accepts an invitation, or selects a membership from the organization switcher. In the case of custom flows, you will need to implement the logic for setting an organization as active. the [`useOrganizationList()`](/docs/references/react/use-organization-list) hook provides a `setActive` method to help you with this.
In the case of [prebuilt components](/docs/components/overview), an organization will _automatically_ be set as active each time the user creates an organization, accepts an invitation, or selects a membership from the organization switcher. In the case of custom flows, you will need to implement the logic for setting an organization as active. The [`useOrganizationList()`](/docs/references/react/use-organization-list) hook provides a `setActive` method to help you with this.

In the example below, a custom organization switcher is created. It allows a user to select an organization from a list of their memberships. The `useOrganizationList()` hook is used to fetch a list of the user's memberships, and the `setActive` method is used to set the selected organization as active.

Expand Down

0 comments on commit df75441

Please sign in to comment.