chore: Added swr to fetch the workspace members (#4874)
This commit is contained in:
parent
a2d691a446
commit
77baf4034b
1 changed files with 5 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ export const WorkspaceMembersList: FC<{ searchQuery: string }> = observer((props
|
|||
// store hooks
|
||||
const {
|
||||
workspace: {
|
||||
fetchWorkspaceMembers,
|
||||
fetchWorkspaceMemberInvitations,
|
||||
workspaceMemberIds,
|
||||
getSearchedWorkspaceMemberIds,
|
||||
|
|
@ -27,6 +28,10 @@ export const WorkspaceMembersList: FC<{ searchQuery: string }> = observer((props
|
|||
workspaceSlug ? `WORKSPACE_INVITATIONS_${workspaceSlug.toString()}` : null,
|
||||
workspaceSlug ? () => fetchWorkspaceMemberInvitations(workspaceSlug.toString()) : null
|
||||
);
|
||||
useSWR(
|
||||
workspaceSlug ? `WORKSPACE_MEMBERS_${workspaceSlug.toString()}` : null,
|
||||
workspaceSlug ? () => fetchWorkspaceMembers(workspaceSlug.toString()) : null
|
||||
);
|
||||
|
||||
if (!workspaceMemberIds && !workspaceMemberInvitationIds) return <MembersSettingsLoader />;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue