From 76bf78b810acd5a1c4a7f0ccdf44d69784d9f54b Mon Sep 17 00:00:00 2001 From: icarus Date: Tue, 14 Oct 2025 18:16:50 +0800 Subject: [PATCH] fix(Footer): move hotkey handler after function definition fix: Error: Cannot access variable before it is declared --- src/renderer/src/windows/mini/home/components/Footer.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/windows/mini/home/components/Footer.tsx b/src/renderer/src/windows/mini/home/components/Footer.tsx index abebc4ed70..cc2e7179e5 100644 --- a/src/renderer/src/windows/mini/home/components/Footer.tsx +++ b/src/renderer/src/windows/mini/home/components/Footer.tsx @@ -33,15 +33,15 @@ const Footer: FC = ({ onEsc() }) - useHotkeys('c', () => { - handleCopy() - }) - const handleCopy = () => { if (loading || !onCopy) return onCopy() } + useHotkeys('c', () => { + handleCopy() + }) + return (