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() onEsc()
}) })
useHotkeys('c', () => {
handleCopy()
})
const handleCopy = () => { const handleCopy = () => {
if (loading || !onCopy) return if (loading || !onCopy) return
onCopy() onCopy()
} }
useHotkeys('c', () => {
handleCopy()
})
return ( return (
<WindowFooter className="drag"> <WindowFooter className="drag">
<FooterText> <FooterText>