default relays
This commit is contained in:
parent
b75bb881b9
commit
befcee6045
@ -60,21 +60,21 @@ export default function Header() {
|
||||
}
|
||||
}, [pubkey]);
|
||||
|
||||
useEffect(() => {
|
||||
if (pubkey) {
|
||||
pool
|
||||
.get(relays, {
|
||||
kinds: [RELAYS],
|
||||
authors: [pubkey],
|
||||
})
|
||||
.then((ev) => {
|
||||
const relays = ev.tags
|
||||
.filter((t) => t.at(0) === "r")
|
||||
.map((t) => t.at(1));
|
||||
setRelays(relays);
|
||||
});
|
||||
}
|
||||
}, [pubkey]);
|
||||
//useEffect(() => {
|
||||
// if (pubkey) {
|
||||
// pool
|
||||
// .get(relays, {
|
||||
// kinds: [RELAYS],
|
||||
// authors: [pubkey],
|
||||
// })
|
||||
// .then((ev) => {
|
||||
// const relays = ev.tags
|
||||
// .filter((t) => t.at(0) === "r")
|
||||
// .map((t) => t.at(1));
|
||||
// setRelays(relays);
|
||||
// });
|
||||
// }
|
||||
//}, [pubkey]);
|
||||
|
||||
async function goToProfile() {
|
||||
const url = `/p/${nip19.nprofileEncode({ pubkey, relays })}`;
|
||||
|
@ -14,7 +14,6 @@ export default function User({ pubkey, showName = true, ...rest }) {
|
||||
return nip19.npubEncode(pubkey);
|
||||
}
|
||||
}, []);
|
||||
console.log("PUBK", pubkey);
|
||||
const content = (
|
||||
<Stack align="center" direction="row" spacing={2}>
|
||||
<Avatar
|
||||
|
@ -1,5 +1,10 @@
|
||||
import { atom } from "jotai";
|
||||
|
||||
export const pubkeyAtom = atom();
|
||||
export const relaysAtom = atom(["wss://nos.lol", "wss://nostr.wine"]);
|
||||
export const relaysAtom = atom([
|
||||
"wss://relay.snort.social",
|
||||
"wss://relay.damus.io",
|
||||
"wss://nos.lol",
|
||||
"wss://nostr.wine",
|
||||
]);
|
||||
export const userEmojiAtom = atom();
|
||||
|
Loading…
Reference in New Issue
Block a user