feat(react. examples): add invitation hook, container, and example app#161
Open
rax7389 wants to merge 2 commits intofeat/mm-invitations-componentsfrom
Open
feat(react. examples): add invitation hook, container, and example app#161rax7389 wants to merge 2 commits intofeat/mm-invitations-componentsfrom
rax7389 wants to merge 2 commits intofeat/mm-invitations-componentsfrom
Conversation
7b93170 to
bf603bf
Compare
2d3d1df to
312a1ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Summary: Adds the central
useOrganizationMemberManagementhook for state management, theOrganizationMemberManagementcontainer component connecting the hook to the view layer, and example app integration with sidebar navigation.Why: The presentational components from PR 3 are purely prop-driven. This PR provides the orchestration layer — a single hook that manages all invitation state (fetching, mutations, pagination, sorting, filtering, modals) and a container component that wires everything together. Separating the hook from the UI components keeps business logic testable and the view layer thin.
What:
*
useOrganizationMemberManagementHook *Central hook managing all invitation lifecycle state via TanStack Query:
coreClient.getMyOrganizationApiClient().ComponentActionhooks (onBefore/onAfter) and automatic query invalidation.previousTokens) for navigating back through cursor-based pages.created_at→created-at).useRefrequest ID tracking for details fetch to discard stale responses.Key internal mappings for server-side sort:
OrganizationMemberManagementContainer ComponentConnects the hook to the view layer with tab-based navigation (Members / Invitations), renders the invitation table and all modals (create, details, revoke, revoke-resend). Supports theming via
getComponentStyles,readOnlymode,hideHeader, and custom CSS classes.Example App Integration
/member-managementpage to thenext-rwaexample app.Usersicon.sidebar.membersi18n key.Exports
OrganizationMemberManagementtocomponents/index.tsuseOrganizationMemberManagementtohooks/index.tsReferences
Part of the member management invitations feature.
Testing
Integration tests are in PR 5.
Checklist