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