eslint fixes

This commit is contained in:
Martti Malmi
2024-01-04 13:13:28 +02:00
parent 9f88b44b91
commit eeb6ec9dd8
12 changed files with 93 additions and 54 deletions

View File

@ -33,15 +33,6 @@ export default function NoteReaction(props: NoteReactionProps) {
return null;
}, [ev]);
if (
ev.kind !== EventKind.Reaction &&
ev.kind !== EventKind.Repost &&
(ev.kind !== EventKind.TextNote ||
ev.tags.every((a, i) => a[1] !== refEvent?.[1] || a[3] !== "mention" || ev.content !== `#[${i}]`))
) {
return null;
}
/**
* Some clients embed the reposted note in the content
*/
@ -63,6 +54,15 @@ export default function NoteReaction(props: NoteReactionProps) {
return props.root;
}
if (
ev.kind !== EventKind.Reaction &&
ev.kind !== EventKind.Repost &&
(ev.kind !== EventKind.TextNote ||
ev.tags.every((a, i) => a[1] !== refEvent?.[1] || a[3] !== "mention" || ev.content !== `#[${i}]`))
) {
return null;
}
if (!inView) {
return <div className="card reaction" ref={ref}></div>;
}