diff --git a/packages/ord-connect/src/components/OrdConnectKit.tsx b/packages/ord-connect/src/components/OrdConnectKit.tsx index c50a49ee..c30313f6 100644 --- a/packages/ord-connect/src/components/OrdConnectKit.tsx +++ b/packages/ord-connect/src/components/OrdConnectKit.tsx @@ -1,5 +1,6 @@ import { ReactNode } from "react"; +import useHasMounted from "../hooks/useHasMounted"; import { useOrdConnect } from "../providers/OrdConnectProvider"; import { PostConnectButton } from "./PostConnectButton"; @@ -32,6 +33,8 @@ export function OrdConnectKit({ const { address, network, isModalOpen, openModal, closeModal } = useOrdConnect(); + const hasMounted = useHasMounted(); + const renderConnectButton = () => { if (hideConnectButton) { return null; @@ -50,7 +53,7 @@ export function OrdConnectKit({ ); }; - return ( + return hasMounted ? ( <> {renderConnectButton()} - ); + ) : null; } diff --git a/packages/ord-connect/src/components/SelectWalletModal/index.tsx b/packages/ord-connect/src/components/SelectWalletModal/index.tsx index ca5f363c..30647cfc 100644 --- a/packages/ord-connect/src/components/SelectWalletModal/index.tsx +++ b/packages/ord-connect/src/components/SelectWalletModal/index.tsx @@ -55,7 +55,6 @@ export function SelectWalletModal({ } = useOrdConnect(); const [errorMessage, setErrorMessage] = useState(""); const isMobile = isMobileUserAgent(); - const isSupportedDevice = !isMobile; const onError = useCallback( ( @@ -426,9 +425,7 @@ export function SelectWalletModal({
- {isSupportedDevice - ? "Choose Bitcoin wallet to connect" - : "Unsupported device"} + Choose Bitcoin wallet to connect