Collect Post Dialog Block
A dialog component for collecting Lens Posts with support for paid collects.
Collecting this post on testnet.
Installation
Usage
import { LensCollectDialog, CollectDialogRef } from "@/components/feed/collects/lens-collect-dialog";
import { LensPostProvider } from "@/lib/lens-post-provider";
import { postId, useSessionClient } from "@lens-protocol/react";
import { useWalletClient } from "wagmi";
const session = useSessionClient();
const wallet = useWalletClient();
const post = postId("SOME_POST_ID");
const collectDialog = useRef<CollectDialogRef>(null);
<LensPostProvider postId={post} session={session} wallet={wallet}>
<button onClick={collectDialog.current?.open}>Collect</button>
<LensCollectDialog ref={collectDialog} />
</LensPostProvider>