Lens Blocks are currently in beta and not ready for production use!

Use Authenticated Account Hook

A hook to get the currently authenticated Lens account using the Lens React SDK.

This hook combines useAuthenticatedUser and useAccount from the Lens React SDK to fetch the currently authenticated Lens Account. It returns the account data, loading state, and any errors encountered during the fetch process.

Installation

Usage

import { useAuthenticatedLensAccount } from "@/hooks/use-authenticated-lens-account";
const { data: account } = useAuthenticatedLensAccount();