From 6d321caad1b9ead33377cc96a54510715ea725de Mon Sep 17 00:00:00 2001 From: Dogtiti <499960698@qq.com> Date: Wed, 19 Apr 2023 23:21:34 +0800 Subject: [PATCH] fix: types error --- public/locales/en/common.json | 5 +++-- public/locales/zh/common.json | 4 +++- src/components/ChatWindow.tsx | 4 ++-- src/pages/agent/index.tsx | 24 +++++++++++++++++++----- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 34acde9a..b458bd9c 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -23,6 +23,7 @@ "current-tasks": "Current tasks", "coming-soon": " Coming Soon!", "back": "Back", - "image":"Image" - + "image": "Image", + "delete": "Delete", + "share": "Share" } diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json index d49b2aa7..7400ab2c 100644 --- a/public/locales/zh/common.json +++ b/public/locales/zh/common.json @@ -23,5 +23,7 @@ "current-tasks": "当前任务", "coming-soon": "即将到来!", "back": "返回", - "image":"图片" + "image": "图片", + "delete": "删除", + "share": "分享" } diff --git a/src/components/ChatWindow.tsx b/src/components/ChatWindow.tsx index f1037faa..42b94461 100644 --- a/src/components/ChatWindow.tsx +++ b/src/components/ChatWindow.tsx @@ -33,7 +33,7 @@ interface ChatWindowProps extends HeaderProps { showDonation: boolean; fullscreen?: boolean; scrollToBottom?: boolean; - showWeChatPay: () => void; + showWeChatPay?: () => void; } const messageListId = "chat-window-message-list"; @@ -282,7 +282,7 @@ const ChatMessage = ({ message }: { message: Message }) => { ); }; -const DonationMessage = ({ showWeChatPay }: { showWeChatPay: () => void }) => { +const DonationMessage = ({ showWeChatPay }: { showWeChatPay?: () => void }) => { const { t } = useTranslation(["chat", "common"]); return (