mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 14:41:24 +08:00
fix(Footer): move hotkey handler after function definition
fix: Error: Cannot access variable before it is declared
This commit is contained in:
parent
f4441e2a55
commit
76bf78b810
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user