From 23637fa2579150636a7b864feb4d26e81dcc05c8 Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Wed, 16 Nov 2022 16:42:48 +0800 Subject: [PATCH] refactor: download link --- package.json | 2 +- src/common/component/BlankPlaceholder.tsx | 8 +++----- src/common/hook/useSendMessage.ts | 2 +- src/index.tsx | 3 ++- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1f5e6f7b..e8a42351 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vocechat-web", - "version": "0.3.17", + "version": "0.3.18", "private": true, "homepage": "https://voce.chat", "dependencies": { diff --git a/src/common/component/BlankPlaceholder.tsx b/src/common/component/BlankPlaceholder.tsx index 37ae2df5..4abb1332 100644 --- a/src/common/component/BlankPlaceholder.tsx +++ b/src/common/component/BlankPlaceholder.tsx @@ -6,7 +6,6 @@ import IconAsk from "../../assets/icons/placeholder.question.svg"; import IconInvite from "../../assets/icons/placeholder.invite.svg"; import IconDownload from "../../assets/icons/placeholder.download.svg"; import UsersModal from "./UsersModal"; -import usePWAInstallPrompt from "../hook/usePWAInstallPrompt"; import { useAppSelector } from "../../app/store"; @@ -19,7 +18,6 @@ const classes = { boxTip: "px-5 text-sm text-[#475467] font-bold text-center" }; const BlankPlaceholder: FC = ({ type = "chat" }) => { - const { showPrompt } = usePWAInstallPrompt(); const server = useAppSelector((store) => store.server); const [inviteModalVisible, setInviteModalVisible] = useState(false); const [createChannelVisible, setCreateChannelVisible] = useState(false); @@ -55,10 +53,10 @@ const BlankPlaceholder: FC = ({ type = "chat" }) => {
{chatTip}
- +
Download Mobile apps
+
Got questions? Visit our help center
diff --git a/src/common/hook/useSendMessage.ts b/src/common/hook/useSendMessage.ts index d59e5e42..8764302b 100644 --- a/src/common/hook/useSendMessage.ts +++ b/src/common/hook/useSendMessage.ts @@ -60,7 +60,7 @@ const useSendMessage = (props?: Props) => { }; const sendMessage = async ({ type = "text", - content, + content = "", properties, reply_mid, ...rest diff --git a/src/index.tsx b/src/index.tsx index 7313cb60..0a98c101 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,4 +1,5 @@ -import "./wdyr"; +// just for debug performance problem +// import "./wdyr"; import ReactDOM from "react-dom/client"; import toast, { Toaster } from "react-hot-toast"; import { Reset } from "styled-reset";