From 7804182d0d027f630497c911652cd877ea0cc30a Mon Sep 17 00:00:00 2001 From: DDMeaqua Date: Mon, 9 Sep 2024 19:18:12 +0800 Subject: [PATCH] fix: type error --- app/components/chat.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index ab94ab41d..085292585 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1428,7 +1428,7 @@ function _Chat() { const [showShortcutKeyModal, setShowShortcutKeyModal] = useState(false); useEffect(() => { - const handleKeyDown = (event) => { + const handleKeyDown = (event: any) => { // 打开新聊天 command + shift + o if ( (event.metaKey || event.ctrlKey) && @@ -1453,7 +1453,8 @@ function _Chat() { event.code === "Semicolon" ) { event.preventDefault(); - const copyCodeButton = document.querySelectorAll(".copy-code-button"); + const copyCodeButton = + document.querySelectorAll(".copy-code-button"); if (copyCodeButton.length > 0) { copyCodeButton[copyCodeButton.length - 1].click(); }