Skip to main content

usePaperWalletUserEmail

Hook for getting the user's email address from connected paper wallet.

You can use the usePaperWallet hook to connect a paper wallet.

import { usePaperWalletUserEmail } from "@thirdweb-dev/react";

const emailQuery = usePaperWalletUserEmail();

Usage

usePaperWalletUserEmail hook returns a query object, you can use the data property to get the user's email address.

import { usePaperWalletUserEmail } from "@thirdweb-dev/react";

function App() {
const emailQuery = usePaperWalletUserEmail();

if (emailQuery.isLoading) {
return <div>Loading Email...</div>;
} else {
if (emailQuery.data) {
return <div>Logged in as {emailQuery.data}</div>;
}
return <div>Not logged in</div>;
}
}