From 3351e3e8b881e64d5b1eb1cb1bb5ddf0f2aa9a8b Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Wed, 18 Dec 2024 22:59:32 +0900 Subject: [PATCH] move theme to wallet level --- src/wallet/components/Wallet.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/wallet/components/Wallet.tsx b/src/wallet/components/Wallet.tsx index 51d0bc2865..c58f28968c 100644 --- a/src/wallet/components/Wallet.tsx +++ b/src/wallet/components/Wallet.tsx @@ -10,7 +10,6 @@ import { WalletDropdown } from './WalletDropdown'; import { WalletProvider, useWalletContext } from './WalletProvider'; function WalletContent({ children, className }: WalletReact) { - const componentTheme = useTheme(); const { isOpen, handleClose, @@ -30,7 +29,7 @@ function WalletContent({ children, className }: WalletReact) { return (
{connect} {isOpen && dropdown} @@ -38,8 +37,9 @@ function WalletContent({ children, className }: WalletReact) { ); } -export const Wallet = ({ children }: WalletReact) => { +export const Wallet = ({ children, className }: WalletReact) => { const isMounted = useIsMounted(); + const componentTheme = useTheme(); // prevents SSR hydration issue if (!isMounted) { @@ -48,7 +48,9 @@ export const Wallet = ({ children }: WalletReact) => { return ( - {children} + + {children} + ); };