FUCK!!!
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
import { RelayContext } from '@components/contexts/relay';
|
||||
import { Content } from '@components/note/content';
|
||||
import { RelayContext } from '@components/relaysProvider';
|
||||
|
||||
import useLocalStorage from '@rehooks/local-storage';
|
||||
import { relaysAtom } from '@stores/relays';
|
||||
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { Author } from 'nostr-relaypool';
|
||||
import { useContext, useEffect, useState } from 'react';
|
||||
|
||||
export default function ProfileNotes({ id }: { id: string }) {
|
||||
const relayPool: any = useContext(RelayContext);
|
||||
const [relays]: any = useLocalStorage('relays');
|
||||
const pool: any = useContext(RelayContext);
|
||||
const relays: any = useAtomValue(relaysAtom);
|
||||
|
||||
const [data, setData] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
const user = new Author(relayPool, relays, id);
|
||||
const user = new Author(pool, relays, id);
|
||||
user.text((res) => setData((data) => [...data, res]), 0, 100);
|
||||
}, [id, relayPool, relays]);
|
||||
}, [id, pool, relays]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
|
||||
Reference in New Issue
Block a user