mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-21 16:01:35 +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()
|
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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user