• useNotInterestedToggle hook let's the active profile toggle the not interested status of a publication.

    You MUST be authenticated via useLogin to use this hook.

    You can use the primaryPublication.operations.isNotInterested property to determine the active profile's interest with the provided publication.

    Returns UseDeferredTask<void, never, UseNotInterestedToggleArgs>

    Example

    import { AnyPublication, useNotInterestedToggle } from '@lens-protocol/react-web';

    function Publication({ publication }: { publication: AnyPublication }) {
    const { execute: toggle, loading } = useNotInterestedToggle();

    return (
    <button onClick={() => toggle({ publication })} disabled={loading}>
    {publication.operations.isNotInterested ? 'Not interested' : 'Interested'}
    </button>
    );
    }