Skip to content

Commit e12cfd9

Browse files
authored
Merge pull request #1356 from topcoder-platform/pm-3137
fix(PM-3137): mutation keys
2 parents 79d77e3 + e74a2c7 commit e12cfd9

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ const AiFeedback: FC<AiFeedbackProps> = props => {
4040
await createFeedbackComment(workflowId as string, workflowRun?.id as string, feedback?.id, {
4141
content,
4242
})
43-
await mutate(`
44-
${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]
45-
`)
43+
// eslint-disable-next-line max-len
44+
await mutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]`)
4645
setShowReply(false)
47-
}, [workflowId, workflowRun?.id, feedback?.id])
46+
}, [workflowId, workflowRun?.id, workflowRun?.status, feedback?.id])
4847

4948
if (!aiFeedbackItems?.length || !feedback) {
5049
return <></>

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackComments/AiFeedbackComment.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,17 @@ export const AiFeedbackComment: FC<AiFeedbackCommentProps> = props => {
3636
content,
3737
parentId: comment.id,
3838
})
39-
await mutate(`
40-
${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]
41-
`)
39+
// eslint-disable-next-line max-len
40+
await mutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]`)
4241
setShowReply(false)
4342
}, [workflowId, workflowRun?.id, props.feedback?.id])
4443

4544
const onEditReply = useCallback(async (content: string, comment: AiFeedbackCommentType) => {
4645
await updateRunItemComment(workflowId as string, workflowRun?.id as string, props.feedback?.id, comment.id, {
4746
content,
4847
})
49-
await mutate(`
50-
${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]
51-
`)
48+
// eslint-disable-next-line max-len
49+
await mutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]`)
5250
setEditMode(false)
5351
}, [workflowId, workflowRun?.id, props.feedback?.id])
5452

0 commit comments

Comments
 (0)