From 3be37ea9ffe38dac0b93844a823c36154c390e60 Mon Sep 17 00:00:00 2001 From: corlard3y Date: Tue, 17 Dec 2024 14:43:39 +0100 Subject: [PATCH] fix tooltip bug --- src/blocks/tooltip/Tooltip.tsx | 32 ++++++++++--------- .../UserProfileSettings/AddTelegram.tsx | 16 ++++++---- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/blocks/tooltip/Tooltip.tsx b/src/blocks/tooltip/Tooltip.tsx index 75de60b4d9..75912f0093 100644 --- a/src/blocks/tooltip/Tooltip.tsx +++ b/src/blocks/tooltip/Tooltip.tsx @@ -97,21 +97,23 @@ const Tooltip: FC = ({ {children} - - {overlay ? ( - overlay - ) : ( - <> - {title && {title}} - {description && {description}} - - )} - + {(title || overlay || description) && ( + + {overlay ? ( + overlay + ) : ( + <> + {title && {title}} + {description && {description}} + + )} + + )} diff --git a/src/components/UserProfileSettings/AddTelegram.tsx b/src/components/UserProfileSettings/AddTelegram.tsx index 9f993fd877..2d9adc3c18 100644 --- a/src/components/UserProfileSettings/AddTelegram.tsx +++ b/src/components/UserProfileSettings/AddTelegram.tsx @@ -36,8 +36,8 @@ const AddTelegram: FC = ({ const { handleConnectWalletAndEnableProfile } = useAppContext(); const caip10WalletAddress = walletToCAIP10({ account }); - const [step, setStep] = useState(2); - const [telegramCode, setTelegramCode] = useState('00000000'); + const [step, setStep] = useState(1); + const [telegramCode, setTelegramCode] = useState(''); const [isLoading, setIsLoading] = useState(false); const { userPushSDKInstance } = useSelector((state: any) => { return state.user; @@ -214,11 +214,13 @@ const AddTelegram: FC = ({ {shortenText(`/verify ${caip10WalletAddress}-${telegramCode}`, 10)} - + {isOpen && ( + + )}