add support for nip-94
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { NoteContent } from '@lume/app/note/components/content';
|
||||
import NoteFile from '@lume/app/note/components/file';
|
||||
import { NoteDefaultUser } from '@lume/app/note/components/user/default';
|
||||
import { NoteWrapper } from '@lume/app/note/components/wrapper';
|
||||
import { RelayContext } from '@lume/shared/relayProvider';
|
||||
@@ -35,15 +36,17 @@ export const MentionNote = memo(function MentionNote({ id }: { id: string }) {
|
||||
};
|
||||
});
|
||||
|
||||
const content = !error && data ? noteParser(data) : null;
|
||||
const kind1 = !error && data?.kind === 1 ? noteParser(data) : null;
|
||||
const kind1063 = !error && data?.kind === 1063 ? data.tags : null;
|
||||
|
||||
return (
|
||||
<NoteWrapper href={`/app/note?id=${id}`} className="mt-3 rounded-lg border border-zinc-800 px-3 py-3">
|
||||
{data ? (
|
||||
<>
|
||||
<NoteDefaultUser pubkey={data.pubkey} time={data.created_at} />
|
||||
<div className="mt-1 pl-[52px]">
|
||||
<NoteContent content={content} />
|
||||
<div className="mt-1 pl-[46px]">
|
||||
{kind1 && <NoteContent content={kind1} />}
|
||||
{kind1063 && <NoteFile url={kind1063[0][1]} />}
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user