refactor note component

This commit is contained in:
Ren Amamiya
2023-07-15 12:20:09 +07:00
parent 41460436df
commit 1f18d8bb44
38 changed files with 1174 additions and 884 deletions

View File

@@ -5,8 +5,6 @@ import { useLiveThread } from '@app/space/hooks/useLiveThread';
import { getNoteByID, removeBlock } from '@libs/storage';
import { Kind1 } from '@shared/notes/contents/kind1';
import { Kind1063 } from '@shared/notes/contents/kind1063';
import { NoteMetadata } from '@shared/notes/metadata';
import { NoteReplyForm } from '@shared/notes/replies/form';
import { RepliesList } from '@shared/notes/replies/list';
@@ -53,12 +51,6 @@ export function ThreadBlock({ params }: { params: any }) {
<div className="rounded-md bg-zinc-900 px-5 pt-5">
<User pubkey={data.pubkey} time={data.created_at} />
<div className="mt-3">
{data.kind === 1 && <Kind1 content={data.content} />}
{data.kind === 1063 && <Kind1063 metadata={data.tags} />}
<NoteMetadata
id={data.event_id || params.content}
eventPubkey={data.pubkey}
/>
<Link to={`/app/note/${params.content}`}>Focus</Link>
</div>
</div>