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

@@ -2,8 +2,6 @@ import { useQuery } from '@tanstack/react-query';
import { useNDK } from '@libs/ndk/provider';
import { Note } from '@shared/notes/note';
import { nHoursAgo } from '@utils/date';
import { LumeEvent } from '@utils/types';
@@ -19,15 +17,5 @@ export function UserFeed({ pubkey }: { pubkey: string }) {
return events as unknown as LumeEvent[];
});
return (
<div className="w-full max-w-[400px] px-2 pb-10">
{status === 'loading' ? (
<div className="px-3">
<p>Loading...</p>
</div>
) : (
data.map((note: LumeEvent) => <Note key={note.id} event={note} />)
)}
</div>
);
return <div className="w-full max-w-[400px] px-2 pb-10"></div>;
}