useAuthModal
A hook that returns the open and close functions for the Auth Modal if uiConfig is enabled on the Account Provider
Import
import { useAuthModal } from "@account-kit/react";
Usage
import { useAuthModal } from "@account-kit/react";
const ComponentWithAuthModal = () => {
const { openAuthModal } = useAuthModal();
return (
<div>
<button onClick={openAuthModal}>Login</button>
</div>
);
};
Returns
UseAuthModalResult
an object containing methods for opening or closing the auth modal