fix(ui): drag image over tab switches to wrong tab

This commit is contained in:
psychedelicious
2024-09-10 06:56:25 +10:00
committed by Kent Keirsey
parent edae8a1617
commit c5543e42c7

View File

@@ -44,7 +44,7 @@ const PanelTabs = memo(({ setTab }: { setTab: (val: number) => void }) => {
const onOnMouseOverLayersTab = useCallback(() => {
tabTimeout.current = window.setTimeout(() => {
if (dndCtx.active) {
setTab(1);
setTab(0);
}
}, 300);
}, [dndCtx.active, setTab]);
@@ -52,7 +52,7 @@ const PanelTabs = memo(({ setTab }: { setTab: (val: number) => void }) => {
const onOnMouseOverGalleryTab = useCallback(() => {
tabTimeout.current = window.setTimeout(() => {
if (dndCtx.active) {
setTab(0);
setTab(1);
}
}, 300);
}, [dndCtx.active, setTab]);