From e12fc249f1c684379c8425e6fe2e0367b83087ca Mon Sep 17 00:00:00 2001 From: lw Date: Fri, 29 Nov 2024 17:50:19 +0700 Subject: [PATCH] [Issue-213] Update some UX for Missions --- .../WalletConnect/ConnectWalletSuccessModal.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx b/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx index f33fa6cfb6..8438c09bcf 100644 --- a/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx +++ b/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx @@ -26,11 +26,17 @@ function Component (props: Props): React.ReactElement { const { inactiveModal } = useContext(ModalContext); - const onClose = useCallback(() => { + const onOk = useCallback(() => { inactiveModal(modalId); callback(address); }, [address, callback, inactiveModal]); + const onClose = useCallback(() => { + inactiveModal(modalId); + // eslint-disable-next-line node/no-callback-literal + callback(''); + }, [callback, inactiveModal]); + const modalFooter = useMemo(() => { return ( <> @@ -43,7 +49,7 @@ function Component (props: Props): React.ReactElement { weight='fill' /> } - onClick={onClose} + onClick={onOk} shape={'round'} size={'sm'} > @@ -51,7 +57,7 @@ function Component (props: Props): React.ReactElement { ); - }, [onClose, t]); + }, [onOk, t]); return (