updated profile page
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { RelayContext } from '@components/relaysProvider';
|
||||
import { UserFollow } from '@components/user/follow';
|
||||
|
||||
import { relaysAtom } from '@stores/relays';
|
||||
|
||||
@@ -19,8 +20,8 @@ export default function ProfileFollowers({ id }: { id: string }) {
|
||||
}, [id, pool, relays]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-3 py-5">
|
||||
{followers && followers.map((follower, index) => <p key={index}>{follower[1]}</p>)}
|
||||
<div className="flex flex-col gap-3 px-3 py-5">
|
||||
{followers && followers.map((follower) => <UserFollow key={follower[1]} pubkey={follower[1]} />)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { RelayContext } from '@components/relaysProvider';
|
||||
import { UserFollow } from '@components/user/follow';
|
||||
|
||||
import { relaysAtom } from '@stores/relays';
|
||||
|
||||
@@ -18,8 +19,8 @@ export default function ProfileFollows({ id }: { id: string }) {
|
||||
}, [id, pool, relays]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-3 py-5">
|
||||
{follows && follows.map((follow, index) => <p key={index}>{follow.pubkey}</p>)}
|
||||
<div className="flex flex-col gap-3 px-3 py-5">
|
||||
{follows && follows.map((follow) => <UserFollow key={follow.pubkey} pubkey={follow.pubkey} />)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Content } from '@components/note/content';
|
||||
import { NoteBase } from '@components/note/base';
|
||||
import { RelayContext } from '@components/relaysProvider';
|
||||
|
||||
import { relaysAtom } from '@stores/relays';
|
||||
@@ -15,17 +15,14 @@ export default function ProfileNotes({ id }: { id: string }) {
|
||||
|
||||
useEffect(() => {
|
||||
const user = new Author(pool, relays, id);
|
||||
user.text((res) => setData((data) => [...data, res]), 0, 100);
|
||||
user.text((res) => setData((data) => [...data, res]), 100, 0);
|
||||
}, [id, pool, relays]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
{data.map((item) => (
|
||||
<div
|
||||
key={item.id}
|
||||
className="flex h-min min-h-min w-full select-text flex-col border-b border-zinc-800 px-3 py-5 hover:bg-black/20"
|
||||
>
|
||||
<Content data={item} />
|
||||
<div key={item.id}>
|
||||
<NoteBase event={item} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user