mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-21 08:22:20 +02:00
fix: address greptile review feedback (greploop iteration 1)
- Add missing useMemo deps (pendingApprovalAction, onApproveApproval, onRejectApproval) in CommentThread timelineSection - Use .mutateAsync in useCallback deps instead of full mutation objects in IssueDetail to prevent unnecessary re-renders
This commit is contained in:
1 parent
45b8198ba2
commit
4161af67d1
2 files changed
+6
-5
No files matched your search
@@ -736,6 +736,7 @@ export const CommentThread = memo(function CommentThread({
|
||||
),
|
||||
[
|
||||
timeline, agentMap, currentUserId, companyId, projectId,
|
||||
onApproveApproval, onRejectApproval, pendingApprovalAction,
|
||||
feedbackVoteByTargetId, feedbackDataSharingPreference,
|
||||
onVote, handleFeedbackVote, votingTargetId, highlightCommentId,
|
||||
feedbackTermsUrl,
|
||||
|
||||
@@ -1052,7 +1052,7 @@ export function IssueDetail() {
|
||||
async (runId: string) => {
|
||||
await interruptQueuedComment.mutateAsync(runId);
|
||||
},
|
||||
[interruptQueuedComment],
|
||||
[interruptQueuedComment.mutateAsync],
|
||||
);
|
||||
|
||||
const handleCommentImageUpload = useCallback(
|
||||
@@ -1060,14 +1060,14 @@ export function IssueDetail() {
|
||||
const attachment = await uploadAttachment.mutateAsync(file);
|
||||
return attachment.contentPath;
|
||||
},
|
||||
[uploadAttachment],
|
||||
[uploadAttachment.mutateAsync],
|
||||
);
|
||||
|
||||
const handleCommentAttachImage = useCallback(
|
||||
async (file: File) => {
|
||||
await uploadAttachment.mutateAsync(file);
|
||||
},
|
||||
[uploadAttachment],
|
||||
[uploadAttachment.mutateAsync],
|
||||
);
|
||||
|
||||
const handleCommentAdd = useCallback(
|
||||
@@ -1078,7 +1078,7 @@ export function IssueDetail() {
|
||||
}
|
||||
await addComment.mutateAsync({ body, reopen });
|
||||
},
|
||||
[addComment, addCommentAndReassign],
|
||||
[addComment.mutateAsync, addCommentAndReassign.mutateAsync],
|
||||
);
|
||||
|
||||
const handleCommentVote = useCallback(
|
||||
@@ -1092,7 +1092,7 @@ export function IssueDetail() {
|
||||
sharingPreferenceAtSubmit: feedbackDataSharingPreference,
|
||||
});
|
||||
},
|
||||
[feedbackVoteMutation, feedbackDataSharingPreference],
|
||||
[feedbackVoteMutation.mutateAsync, feedbackDataSharingPreference],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user