• Hide a publication posted by the authenticated profile to prevent other profiles from seeing it.

    You MUST be authenticated via useLogin to use this hook.

    Returns UseDeferredTask<void, never, UseHidePublicationArgs>

    Example

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

    function HidePublication({ publication }: { publication: AnyPublication }) {
    const { execute: hide, loading } = useHidePublication();

    if (publication.isHidden) {
    return <span>Publication is hidden</span>;
    }

    return (
    <button onClick={() => hide({ publication })} disabled={loading}>
    Hide publication
    </button>
    );
    }