fix naddr loading

This commit is contained in:
2023-06-17 22:07:17 +01:00
parent fa823afa33
commit 206aaca7b4
5 changed files with 42 additions and 30 deletions

View File

@ -14,8 +14,8 @@ export function LiveEvent({ ev }: { ev: NostrEvent }) {
}
}, [video, ev]);
return (
<div>
<video ref={video} controls={true} autoPlay={true} muted={true} />
<div className="w-max">
<video className="w-max" ref={video} controls={true} />
</div>
);
}

View File

@ -261,8 +261,11 @@ export default function Thread() {
// Root is the parent of the current note or the current note if its a root note or the root of the thread
const root = useMemo(() => {
const currentNote =
thread.data?.find(ne => ne.id === currentId) ??
(location.state && "sig" in location.state ? (location.state as TaggedRawEvent) : undefined);
thread.data?.find(
ne =>
ne.id === currentId ||
(link.type === NostrPrefix.Address && findTag(ne, "d") === currentId && ne.pubkey === link.author)
) ?? (location.state && "sig" in location.state ? (location.state as TaggedRawEvent) : undefined);
if (currentNote) {
const currentThread = EventExt.extractThread(currentNote);
const isRoot = (ne?: ThreadInfo) => ne === undefined;