fix: projects page flickering, mutation of workspace members
This commit is contained in:
parent
02f0d14dc0
commit
e4de5e62c9
10 changed files with 101 additions and 27 deletions
|
|
@ -41,7 +41,7 @@ const WorkspaceInvite: NextPage = () => {
|
|||
const { setToastAlert } = useToast();
|
||||
|
||||
const { data: workspaceMembers, mutate: mutateMembers } = useSWR<any[]>(
|
||||
activeWorkspace ? WORKSPACE_MEMBERS : null,
|
||||
activeWorkspace ? WORKSPACE_MEMBERS(activeWorkspace.slug) : null,
|
||||
activeWorkspace ? () => workspaceService.workspaceMembers(activeWorkspace.slug) : null
|
||||
);
|
||||
const { data: workspaceInvitations, mutate: mutateInvitations } = useSWR<any[]>(
|
||||
|
|
@ -229,7 +229,7 @@ const WorkspaceInvite: NextPage = () => {
|
|||
)}
|
||||
</td>
|
||||
<td className="whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:pl-6">
|
||||
{member.status ? (
|
||||
{member.member ? (
|
||||
<span className="p-0.5 px-2 text-sm bg-green-700 text-white rounded-full">
|
||||
Active
|
||||
</span>
|
||||
|
|
@ -277,7 +277,7 @@ const WorkspaceInvite: NextPage = () => {
|
|||
className="w-full text-left py-2 pl-2"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (member.status) {
|
||||
if (member.member) {
|
||||
setSelectedRemoveMember(member.id);
|
||||
} else {
|
||||
setSelectedInviteRemoveMember(member.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue