diff --git a/src/app/page.tsx b/src/app/page.tsx index 12646c5..55aa1aa 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,12 +2,12 @@ import { ConnectButton } from "@rainbow-me/rainbowkit"; import { Balances, ConnectBitcoin } from "@/index"; - +import { Wallet } from "lucide-react"; const Page = () => { return (
- + } />
diff --git a/src/components/ConnectBitcoin/index.tsx b/src/components/ConnectBitcoin/index.tsx index 0455aca..2147476 100644 --- a/src/components/ConnectBitcoin/index.tsx +++ b/src/components/ConnectBitcoin/index.tsx @@ -59,10 +59,10 @@ const WalletButton = React.memo( height="75" alt={`${label} wallet`} /> -
+
{loading.isLoading && loading.walletType === walletType ? (
- +
) : ( label @@ -93,7 +93,7 @@ const Details = React.memo(({ address, disconnect }: any) => { @@ -105,7 +105,7 @@ const Details = React.memo(({ address, disconnect }: any) => {
- - - - Connect a Bitcoin Wallet - -
- - - -
-
- - ); -}); +interface ConnectProps { + connectWallet: (walletType: WalletType) => void; + loading: { + isLoading: boolean; + walletType: WalletType | null; + }; + icon?: JSX.Element; + className?: string; +} +const Connect = React.memo( + ({ connectWallet, loading, className,icon }: ConnectProps) => { + return ( + + + + + + + Connect a Bitcoin Wallet + +
+ + + +
+
+
+ ); + } +); -export const ConnectBitcoin = () => { +interface ConnectBitcoinProps { + className?: string; + icon?: JSX.Element; +} +export const ConnectBitcoin: React.FC = ({ + className, + icon +}) => { const { address, loading, connectWallet, disconnect } = useBitcoinWallet(); const modalComponent = useMemo(() => { if (address) { return
; } - return ; + return ( + + ); }, [address, loading, connectWallet, disconnect]); return
{modalComponent}
;