From 0c85cd88306d4d2a0d3473feabbb2f1e9a0ecdbc Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Wed, 18 Dec 2024 23:02:43 +0900 Subject: [PATCH] reorder --- src/wallet/components/Wallet.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/components/Wallet.tsx b/src/wallet/components/Wallet.tsx index c58f28968c..a70a03ab7f 100644 --- a/src/wallet/components/Wallet.tsx +++ b/src/wallet/components/Wallet.tsx @@ -16,6 +16,8 @@ function WalletContent({ children, className }: WalletReact) { containerRef: walletContainerRef, } = useWalletContext(); + useOutsideClick(walletContainerRef, handleClose); + const { connect, dropdown } = useMemo(() => { const childrenArray = Children.toArray(children); return { @@ -24,8 +26,6 @@ function WalletContent({ children, className }: WalletReact) { }; }, [children]); - useOutsideClick(walletContainerRef, handleClose); - return (
{ - const isMounted = useIsMounted(); const componentTheme = useTheme(); + const isMounted = useIsMounted(); // prevents SSR hydration issue if (!isMounted) {