From c3e60db63471d18ae416ed3e0ae349a2a45019d9 Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Sun, 26 Feb 2023 14:41:31 +0800 Subject: [PATCH] feat: add level prop to qrcode --- src/common/component/QRCode.tsx | 41 ++++++++++++----------- src/routes/chat/GuestBlankPlaceholder.tsx | 2 +- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/common/component/QRCode.tsx b/src/common/component/QRCode.tsx index 46f91a76..579611b7 100644 --- a/src/common/component/QRCode.tsx +++ b/src/common/component/QRCode.tsx @@ -4,29 +4,32 @@ import { useAppSelector } from '../../app/store'; type Props = { link: string, - size?: number + size?: number, + level?: "L" | "M" | "H" | "Q" } -const QRCode = ({ link, size = 512 }: Props) => { +const QRCode = ({ link, size = 512, level = "L" }: Props) => { const logo = useAppSelector(store => store.server.logo); return ( - +
+ +
); }; diff --git a/src/routes/chat/GuestBlankPlaceholder.tsx b/src/routes/chat/GuestBlankPlaceholder.tsx index a39837b2..3b00ab82 100644 --- a/src/routes/chat/GuestBlankPlaceholder.tsx +++ b/src/routes/chat/GuestBlankPlaceholder.tsx @@ -27,7 +27,7 @@ const GuestBlankPlaceholder = () => {
{t("guest_login_tip")}
- +