feat(rbac): fixed broken invite and role missing in dropdown

This commit is contained in:
Akhil Mohan
2023-09-08 21:22:36 +05:30
parent cb9ee00ed3
commit 6bbdc4a405
9 changed files with 42 additions and 30 deletions
@@ -66,6 +66,7 @@ import { useFetchServerStatus } from "@app/hooks/api/serverDetails";
type Props = {
roles?: TRole<undefined>[];
isRolesLoading?: boolean;
};
const addMemberFormSchema = yup.object({
@@ -74,7 +75,7 @@ const addMemberFormSchema = yup.object({
type TAddMemberForm = yup.InferType<typeof addMemberFormSchema>;
export const OrgMembersTable = ({ roles = [] }: Props) => {
export const OrgMembersTable = ({ roles = [], isRolesLoading }: Props) => {
const router = useRouter();
const { createNotification } = useNotificationContext();
@@ -292,7 +293,7 @@ export const OrgMembersTable = ({ roles = [] }: Props) => {
setInviteLinkCopied.on();
};
const isLoading = isMembersLoading || IsWsMembershipLoading;
const isLoading = isMembersLoading || IsWsMembershipLoading || isRolesLoading;
return (
<div className="w-full">