useInView rootMargin

This commit is contained in:
Martti Malmi
2023-12-13 11:25:15 +02:00
parent 3fa13de33e
commit b199d297ce
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ export interface NoteReactionProps {
export default function NoteReaction(props: NoteReactionProps) {
const { data: ev } = props;
const { isMuted } = useModeration();
const { inView, ref } = useInView({ triggerOnce: true });
const { inView, ref } = useInView({ triggerOnce: true, rootMargin: "2000px" });
const profile = useUserProfile(inView ? ev.pubkey : "");
const refEvent = useMemo(() => {