fix(ui): fix dnd on nodes

I had broken this earlier today
This commit is contained in:
psychedelicious
2023-07-05 19:06:40 +10:00
parent 6c6d600cea
commit 2a7dee17be
2 changed files with 16 additions and 36 deletions

View File

@ -80,15 +80,14 @@ const ControlNetImagePreview = (props: Props) => {
}
}, [controlImage, controlNetId]);
const droppableData = useMemo<TypesafeDroppableData | undefined>(() => {
if (controlNetId) {
return {
id: controlNetId,
actionType: 'SET_CONTROLNET_IMAGE',
context: { controlNetId },
};
}
}, [controlNetId]);
const droppableData = useMemo<TypesafeDroppableData | undefined>(
() => ({
id: controlNetId,
actionType: 'SET_CONTROLNET_IMAGE',
context: { controlNetId },
}),
[controlNetId]
);
const postUploadAction = useMemo<PostUploadAction>(
() => ({ type: 'SET_CONTROLNET_IMAGE', controlNetId }),