fix(Footer): move hotkey handler after function definition

fix: Error: Cannot access variable before it is declared
This commit is contained in:
icarus 2025-10-14 18:16:50 +08:00
parent f4441e2a55
commit 76bf78b810

View File

@ -33,15 +33,15 @@ const Footer: FC<FooterProps> = ({
onEsc()
})
useHotkeys('c', () => {
handleCopy()
})
const handleCopy = () => {
if (loading || !onCopy) return
onCopy()
}
useHotkeys('c', () => {
handleCopy()
})
return (
<WindowFooter className="drag">
<FooterText>