Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ const AiReviewTab = ({ challenge, onUpdateReviewers, metadata = {}, isLoading, r
console.error('Error deleting AI review configuration:', err)
})
}

const updatedReviewers = (challenge.reviewers || []).filter(reviewer => !isAIReviewer(reviewer))
onUpdateReviewers({ field: 'reviewers', value: updatedReviewers })

setConfigurationMode(null)
resetConfiguration()
}, [setConfigurationMode, resetConfiguration, configId])
}, [challenge.reviewers, configId, onUpdateReviewers, resetConfiguration, setConfigurationMode])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ performance]
The dependency array for the useCallback hook now includes challenge.reviewers, which is an array. This could lead to unnecessary re-creations of the callback if the array reference changes, even if its contents do not. Consider using a stable reference or a different approach to avoid unnecessary re-renders.


const handleSwitchConfigurationMode = useCallback((mode, template) => {
if (mode === 'manual') {
Expand Down
Loading