fix(ui): allow drop of currently-selected image for compare

This commit is contained in:
psychedelicious 2024-06-01 09:41:54 +10:00
parent dd74e89127
commit 940de6a5c5

View File

@ -33,9 +33,7 @@ export const isValidDrop = (overData?: TypesafeDroppableData | null, activeData?
return (
payloadType === 'IMAGE_DTO' &&
activeData.id !== 'image-compare-first-image' &&
activeData.id !== 'image-compare-second-image' &&
activeData.payload.imageDTO.image_name !== overData.context.firstImageName &&
activeData.payload.imageDTO.image_name !== overData.context.secondImageName
activeData.id !== 'image-compare-second-image'
);
case 'ADD_TO_BOARD': {
// If the board is the same, don't allow the drop