useConnectionStatus
Hook for checking whether your app is connected to a wallet.
import { useConnectionStatus } from "@thirdweb-dev/react";
Usage
import { useConnectionStatus } from "@thirdweb-dev/react";
function App() {
const connectionStatus = useConnectionStatus();
if (connectionStatus === "unknown") return <p> Loading... </p>;
if (connectionStatus === "connecting") return <p> Connecting... </p>;
if (connectionStatus === "connected") return <p> You are connected </p>;
if (connectionStatus === "disconnected")
return <p> You are not connected to a wallet </p>;
}