refactor note component
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user