Skip to content

Commit

Permalink
Merge pull request #7350 from alkem-io/client-7348-fix-bok-vc-invite
Browse files Browse the repository at this point in the history
[VC invites] Fix BoK not loading every time in preview dialog
  • Loading branch information
reactoholic authored Dec 17, 2024
2 parents 6470d6c + 54b83b8 commit f8eda9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/domain/community/inviteContributors/InviteVCsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const InviteVCsDialog = ({ open, onClose }: InviteContributorDialogProps) => {
memoizedDebouncedFetchVCs();
}, [virtualContributors]); // do not add memoizedDebouncedFetchVCs in the dependencies

const getContributorsBoKProfile = async () => {
const vc = getContributorById(selectedVirtualContributorId);
const getContributorsBoKProfile = async (vcId: string) => {
const vc = getContributorById(vcId);
const isBoKSpace = vc?.aiPersona?.bodyOfKnowledgeType === AiPersonaBodyOfKnowledgeType.AlkemioSpace;
const bodyOfKnowledgeID = vc?.aiPersona?.bodyOfKnowledgeID;

Expand All @@ -91,7 +91,7 @@ const InviteVCsDialog = ({ open, onClose }: InviteContributorDialogProps) => {
setActionButtonDisabled(false);
setOpenPreviewDialog(true);

const vcBoK = await getContributorsBoKProfile();
const vcBoK = await getContributorsBoKProfile(id);
setBoKProfile(vcBoK);
};

Expand Down
2 changes: 1 addition & 1 deletion src/domain/community/user/userCard/UserCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const UserCard = ({

return (
<ContributeCard to={url} aria-label="user-card">
<Box onClick={onCardClick}>
<Box onClick={onCardClick} sx={{ cursor: onCardClick !== noop ? 'pointer' : 'default' }}>
{loading ? (
<Skeleton variant={'rectangular'}>
<Avatar />
Expand Down

0 comments on commit f8eda9d

Please sign in to comment.