Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for logging out the current user
useLogout
import { useLogout } from "@getpara/react-sdk";
function LogoutButton() { const { logout, logoutAsync, isPending } = useLogout(); const { data: account } = useAccount(); const handleLogout = async () => { try { await logoutAsync({ clearPregenWallets: false // Keep pregenerated wallets }); console.log("Successfully logged out"); } catch (err) { console.error("Logout failed:", err); } }; if (!account?.isConnected) { return null; } return ( <button onClick={handleLogout} disabled={isPending} > {isPending ? "Logging out..." : "Logout"} </button> ); }