From cbe5d9a047149687ee299176beb766be7aa3de59 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:26:38 +0530 Subject: [PATCH] chore: issue reaction response updated (#3951) --- packages/types/src/issues/issue_reaction.d.ts | 4 ++-- web/components/issues/issue-detail/reactions/issue.tsx | 2 +- web/store/issue/issue-details/reaction.store.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/types/src/issues/issue_reaction.d.ts b/packages/types/src/issues/issue_reaction.d.ts index a4eaee0a8..7fba8cd9c 100644 --- a/packages/types/src/issues/issue_reaction.d.ts +++ b/packages/types/src/issues/issue_reaction.d.ts @@ -1,7 +1,7 @@ export type TIssueReaction = { - actor_id: string; + actor: string; id: string; - issue_id: string; + issue: string; reaction: string; }; diff --git a/web/components/issues/issue-detail/reactions/issue.tsx b/web/components/issues/issue-detail/reactions/issue.tsx index c21f92139..6fcd35ac4 100644 --- a/web/components/issues/issue-detail/reactions/issue.tsx +++ b/web/components/issues/issue-detail/reactions/issue.tsx @@ -79,7 +79,7 @@ export const IssueReaction: FC = observer((props) => { const reactionUsers = (reactionIds?.[reaction] || []) .map((reactionId) => { const reactionDetails = getReactionById(reactionId); - return reactionDetails ? getUserDetails(reactionDetails.actor_id)?.display_name : null; + return reactionDetails ? getUserDetails(reactionDetails.actor)?.display_name : null; }) .filter((displayName): displayName is string => !!displayName); diff --git a/web/store/issue/issue-details/reaction.store.ts b/web/store/issue/issue-details/reaction.store.ts index a32ba6eca..e873e4c8c 100644 --- a/web/store/issue/issue-details/reaction.store.ts +++ b/web/store/issue/issue-details/reaction.store.ts @@ -84,7 +84,7 @@ export class IssueReactionStore implements IIssueReactionStore { if (reactions?.[reaction]) reactions?.[reaction].map((reactionId) => { const currentReaction = this.getReactionById(reactionId); - if (currentReaction && currentReaction.actor_id === userId) _userReactions.push(currentReaction); + if (currentReaction && currentReaction.actor === userId) _userReactions.push(currentReaction); }); }); @@ -151,7 +151,7 @@ export class IssueReactionStore implements IIssueReactionStore { ) => { try { const userReactions = this.reactionsByUser(issueId, userId); - const currentReaction = find(userReactions, { actor_id: userId, reaction: reaction }); + const currentReaction = find(userReactions, { actor: userId, reaction: reaction }); if (currentReaction && currentReaction.id) { runInAction(() => {