fix(ui): fix metadata hotkeys using prev image data

Sets the hotkey dependency array to use `metadata`.

TBH I'm not sure why `imageDTO` isn't working for the dependency array, it looks like it should...
This commit is contained in:
psychedelicious 2023-11-20 09:41:10 +11:00
parent f57b277d5a
commit 667a2a3d84

View File

@ -127,7 +127,7 @@ const CurrentImageButtons = () => {
recallSeed(metadata?.seed);
}, [metadata?.seed, recallSeed]);
useHotkeys('s', handleUseSeed, [imageDTO]);
useHotkeys('s', handleUseSeed, [metadata]);
const handleUsePrompt = useCallback(() => {
recallBothPrompts(
@ -144,7 +144,7 @@ const CurrentImageButtons = () => {
recallBothPrompts,
]);
useHotkeys('p', handleUsePrompt, [imageDTO]);
useHotkeys('p', handleUsePrompt, [metadata]);
useHotkeys('w', handleLoadWorkflow, [workflow]);