fix(ui): staging hotkeys enabled at wrong times

This commit is contained in:
psychedelicious 2024-08-29 21:37:38 +10:00
parent d43e2d690e
commit a58c8adc38

View File

@ -98,9 +98,9 @@ export const StagingAreaToolbar = memo(() => {
onPrev, onPrev,
{ {
preventDefault: true, preventDefault: true,
enabled: isCanvasActive, enabled: isCanvasActive && shouldShowStagedImage && imageCount > 1,
}, },
[isCanvasActive] [isCanvasActive, shouldShowStagedImage, imageCount]
); );
useHotkeys( useHotkeys(
@ -108,9 +108,9 @@ export const StagingAreaToolbar = memo(() => {
onNext, onNext,
{ {
preventDefault: true, preventDefault: true,
enabled: isCanvasActive, enabled: isCanvasActive && shouldShowStagedImage && imageCount > 1,
}, },
[isCanvasActive] [isCanvasActive, shouldShowStagedImage, imageCount]
); );
useHotkeys( useHotkeys(
@ -118,9 +118,9 @@ export const StagingAreaToolbar = memo(() => {
onAccept, onAccept,
{ {
preventDefault: true, preventDefault: true,
enabled: isCanvasActive, enabled: isCanvasActive && shouldShowStagedImage && imageCount > 1,
}, },
[isCanvasActive] [isCanvasActive, shouldShowStagedImage, imageCount]
); );
const counterText = useMemo(() => { const counterText = useMemo(() => {