mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-11 05:09:36 +02:00
update prettier
This commit is contained in:
parent
46902cdd6f
commit
035faf1b5f
@ -2,7 +2,7 @@ describe("Embeds", () => {
|
||||
describe("hashtags", () => {
|
||||
it('should handle uppercase hashtags and ","', () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsrj5ns6wva3fcghlyx0hp7hhajqtqk3kuckp7xhhscrm4jl7futegpz9mhxue69uhkummnw3e82efwvdhk6qgswaehxw309ahx7um5wgh8w6twv5pkpt8l"
|
||||
"#/n/nevent1qqsrj5ns6wva3fcghlyx0hp7hhajqtqk3kuckp7xhhscrm4jl7futegpz9mhxue69uhkummnw3e82efwvdhk6qgswaehxw309ahx7um5wgh8w6twv5pkpt8l",
|
||||
);
|
||||
|
||||
cy.findByRole("link", { name: "#Japan" }).should("be.visible");
|
||||
@ -15,18 +15,18 @@ describe("Embeds", () => {
|
||||
describe("links", () => {
|
||||
it("embed trustless.computer links", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsfn2mv3pe2v7jak4r5wnyengt36t0rx26w04hgysrmtpml8jnlk5cprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2qgawaehxw309ahx7um5wgkhqatz9emk2mrvdaexgetj9ehx2aq2wry06"
|
||||
"#/n/nevent1qqsfn2mv3pe2v7jak4r5wnyengt36t0rx26w04hgysrmtpml8jnlk5cprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2qgawaehxw309ahx7um5wgkhqatz9emk2mrvdaexgetj9ehx2aq2wry06",
|
||||
);
|
||||
|
||||
cy.get('[href="https://trustless.computer/"]').should("be.visible");
|
||||
cy.get(
|
||||
'[href="https://mempool.space/tx/461c6f56015c94d74837b68c9d08f4b80e7db7ca1e5ac4c53d9aa8c76b667672"]'
|
||||
'[href="https://mempool.space/tx/461c6f56015c94d74837b68c9d08f4b80e7db7ca1e5ac4c53d9aa8c76b667672"]',
|
||||
).should("be.visible");
|
||||
});
|
||||
|
||||
it("embeds links", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsvg6kt4hl79qpp5p673g7ref6r0c5jvp4yys7mmvs4m50t30sy9dgpz9mhxue69uhkummnw3e82efwvdhk6qgjwaehxw309aex2mrp0yhxvdm69e5k7r3xlpe"
|
||||
"#/n/nevent1qqsvg6kt4hl79qpp5p673g7ref6r0c5jvp4yys7mmvs4m50t30sy9dgpz9mhxue69uhkummnw3e82efwvdhk6qgjwaehxw309aex2mrp0yhxvdm69e5k7r3xlpe",
|
||||
);
|
||||
|
||||
cy.get('[href="https://getalby.com/"]').should("exist");
|
||||
@ -38,11 +38,11 @@ describe("Embeds", () => {
|
||||
|
||||
it("embeds simplex.chat links", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsymds0vlpp4f5s0dckjf4qz283pdsen0rmx8lu7ct6hpnxag2hpacpremhxue69uhkummnw3ez6un9d3shjtnwda4k7arpwfhjucm0d5q3qamnwvaz7tmwdaehgu3wwa5kueghxyq76"
|
||||
"#/n/nevent1qqsymds0vlpp4f5s0dckjf4qz283pdsen0rmx8lu7ct6hpnxag2hpacpremhxue69uhkummnw3ez6un9d3shjtnwda4k7arpwfhjucm0d5q3qamnwvaz7tmwdaehgu3wwa5kueghxyq76",
|
||||
);
|
||||
|
||||
cy.get(
|
||||
'[href="https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2F0YuTwO05YJWS8rkjn9eLJDjQhFKvIYd8d4xG8X1blIU%3D%40smp8.simplex.im%2FVlHiRmia02CDgga7w-uNb2FQZTZsj3UR%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAd2GEWU9Zjrljhw8O4FldcxrqehkDWezXl-cWD-VkeEw%253D%26srv%3Dbeccx4yfxxbvyhqypaavemqurytl6hozr47wfc7uuecacjqdvwpw2xid.onion"]'
|
||||
'[href="https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2F0YuTwO05YJWS8rkjn9eLJDjQhFKvIYd8d4xG8X1blIU%3D%40smp8.simplex.im%2FVlHiRmia02CDgga7w-uNb2FQZTZsj3UR%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAd2GEWU9Zjrljhw8O4FldcxrqehkDWezXl-cWD-VkeEw%253D%26srv%3Dbeccx4yfxxbvyhqypaavemqurytl6hozr47wfc7uuecacjqdvwpw2xid.onion"]',
|
||||
).should("be.visible");
|
||||
});
|
||||
});
|
||||
@ -50,7 +50,7 @@ describe("Embeds", () => {
|
||||
describe("Nostr links", () => {
|
||||
it("should embed noub1...", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsd5yw7sntqfc4e7u4aempvgctry2plz653t9gpf97ctk5vc0ftskgpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3zamnwvaz7tmwdaehgun4v5hxxmmdfxdj3a"
|
||||
"#/n/nevent1qqsd5yw7sntqfc4e7u4aempvgctry2plz653t9gpf97ctk5vc0ftskgpz3mhxue69uhhyetvv9ujuerpd46hxtnfduq3zamnwvaz7tmwdaehgun4v5hxxmmdfxdj3a",
|
||||
);
|
||||
cy.contains("Alby team");
|
||||
|
||||
@ -69,7 +69,7 @@ describe("Embeds", () => {
|
||||
describe("youtube", () => {
|
||||
it("should embed playlists", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqs8w6e63smpr5ccmz4l0w5pvnkp6r7z2fxaadjwu2g74y95pl9xv0cpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqqkgf54"
|
||||
"#/n/nevent1qqs8w6e63smpr5ccmz4l0w5pvnkp6r7z2fxaadjwu2g74y95pl9xv0cpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqqkgf54",
|
||||
);
|
||||
|
||||
cy.findByTitle(/youtube video player/i).should("be.visible");
|
||||
@ -80,31 +80,31 @@ describe("Embeds", () => {
|
||||
describe("Music", () => {
|
||||
it("should handle wavlake links", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsve4ud5v8gjds2f2h7exlmjvhqayu4s520pge7frpwe22wezny0pcpp4mhxue69uhkummn9ekx7mqprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2mxs3z0"
|
||||
"#/n/nevent1qqsve4ud5v8gjds2f2h7exlmjvhqayu4s520pge7frpwe22wezny0pcpp4mhxue69uhkummn9ekx7mqprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2mxs3z0",
|
||||
);
|
||||
cy.findByTitle("Wavlake Embed").should("be.visible");
|
||||
});
|
||||
|
||||
it("should handle spotify links", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsx0lz7m72qzq499exwhnfszvgwea8tv38x9wkv32yhkmwwmhgs7jgprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk25m3sln"
|
||||
"#/n/nevent1qqsx0lz7m72qzq499exwhnfszvgwea8tv38x9wkv32yhkmwwmhgs7jgprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk25m3sln",
|
||||
);
|
||||
cy.findByTitle("Spotify List Embed").should("exist");
|
||||
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsqxkmz49hydf8ppa9k6x6zrcq7m4evhhlye0j3lcnz8hrl2q6np4spz3mhxue69uhhyetvv9ujuerpd46hxtnfdult02qz"
|
||||
"#/n/nevent1qqsqxkmz49hydf8ppa9k6x6zrcq7m4evhhlye0j3lcnz8hrl2q6np4spz3mhxue69uhhyetvv9ujuerpd46hxtnfdult02qz",
|
||||
);
|
||||
cy.findByTitle("Spotify Embed").should("exist");
|
||||
});
|
||||
|
||||
it("should handle apple music links", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqs9kqt9d7r4zjpawcyl82x5qsn4hals4wn294dv95knrahs4mggwasprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2whhzvz"
|
||||
"#/n/nevent1qqs9kqt9d7r4zjpawcyl82x5qsn4hals4wn294dv95knrahs4mggwasprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2whhzvz",
|
||||
);
|
||||
cy.findByTitle("Apple Music Embed").should("exist");
|
||||
|
||||
cy.visit(
|
||||
"#/n/nevent1qqszyrz4uug75j4086kj4f8peg3g0v8g9f04zjxplnpq0uxljtthggqprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2aeexmq"
|
||||
"#/n/nevent1qqszyrz4uug75j4086kj4f8peg3g0v8g9f04zjxplnpq0uxljtthggqprdmhxue69uhkvet9v3ejumn0wd68ytnzv9hxgtmdv4kk2aeexmq",
|
||||
);
|
||||
cy.findByTitle("Apple Music List Embed").should("exist");
|
||||
});
|
||||
@ -118,7 +118,7 @@ describe("Embeds", () => {
|
||||
describe("Emoji", () => {
|
||||
it("should embed emojis", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsdj7k47uh4z0ypl2m29lvd4ar9zpf6dcy7ls0q6g6qctnxfj5n3pcpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqdyqlpq"
|
||||
"#/n/nevent1qqsdj7k47uh4z0ypl2m29lvd4ar9zpf6dcy7ls0q6g6qctnxfj5n3pcpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqdyqlpq",
|
||||
);
|
||||
|
||||
cy.findByRole("img", { name: /pepeD/i }).should("be.visible");
|
||||
|
@ -50,7 +50,7 @@ describe("Login view", () => {
|
||||
|
||||
it("should redirect after login", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqs88gdxv36qsjfwr66k7wxuq9r2tg8rsdcnfkcqdg4sc6vlnsma98qpzpmhxue69uhkummnw3ezuamfdejsz9rhwden5te0wfjkccte9ejxzmt4wvhxjmccew89d"
|
||||
"#/n/nevent1qqs88gdxv36qsjfwr66k7wxuq9r2tg8rsdcnfkcqdg4sc6vlnsma98qpzpmhxue69uhkummnw3ezuamfdejsz9rhwden5te0wfjkccte9ejxzmt4wvhxjmccew89d",
|
||||
);
|
||||
|
||||
cy.findByRole("link", { name: /login/i }).click();
|
||||
|
@ -1,7 +1,7 @@
|
||||
describe("Profile view", () => {
|
||||
it("should load a rss feed profile", () => {
|
||||
cy.visit(
|
||||
"#/u/nprofile1qqsp6hxqjatvxtesgszs8aee0fcjccxa3ef3mzjva4uv2yr5lucp6jcpzemhxue69uhhyumnd3shjtnwdaehgu3wd4hk2s8c5un"
|
||||
"#/u/nprofile1qqsp6hxqjatvxtesgszs8aee0fcjccxa3ef3mzjva4uv2yr5lucp6jcpzemhxue69uhhyumnd3shjtnwdaehgu3wd4hk2s8c5un",
|
||||
);
|
||||
|
||||
cy.contains("fjsmu");
|
||||
|
@ -2,7 +2,7 @@ describe("No account", () => {
|
||||
describe("note view", () => {
|
||||
it("should fetch and render note", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqs84hwdlls703w4yf66qsszxjqfc0xselfxrzr6n4qp40vzdnczragpr4mhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet5jcwczn"
|
||||
"#/n/nevent1qqs84hwdlls703w4yf66qsszxjqfc0xselfxrzr6n4qp40vzdnczragpr4mhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet5jcwczn",
|
||||
);
|
||||
|
||||
cy.get(".chakra-card")
|
||||
|
@ -1,7 +1,7 @@
|
||||
describe("Thread", () => {
|
||||
it("should handle quote notes with e tags correctly", () => {
|
||||
cy.visit(
|
||||
"#/n/nevent1qqsx2lnyuke6vmsrz9fdrd6uwjy0g0e9l6menfgdj5truugkh9qmkkgpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqgc9md6"
|
||||
"#/n/nevent1qqsx2lnyuke6vmsrz9fdrd6uwjy0g0e9l6menfgdj5truugkh9qmkkgpzpmhxue69uhkummnw3ezuamfdejszrthwden5te0dehhxtnvdakqgc9md6",
|
||||
);
|
||||
|
||||
// find first note
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -7,7 +7,7 @@ export function embedEmoji(content: EmbedableContent, note: NostrEvent | DraftNo
|
||||
regexp: /:([a-zA-Z0-9_]+):/i,
|
||||
render: (match) => {
|
||||
const emojiTag = note.tags.find(
|
||||
(tag) => tag[0] === "emoji" && tag[1].toLowerCase() === match[1].toLowerCase() && tag[2]
|
||||
(tag) => tag[0] === "emoji" && tag[1].toLowerCase() === match[1].toLowerCase() && tag[2],
|
||||
);
|
||||
if (emojiTag) {
|
||||
return (
|
||||
|
@ -67,7 +67,7 @@ export default function PeopleListProvider({ children }: PropsWithChildren) {
|
||||
list,
|
||||
setList,
|
||||
}),
|
||||
[list, setList]
|
||||
[list, setList],
|
||||
);
|
||||
|
||||
return <PeopleListContext.Provider value={context}>{children}</PeopleListContext.Provider>;
|
||||
|
@ -98,7 +98,7 @@ export const PostModal = ({ isOpen, onClose, initialDraft }: PostModalProps) =>
|
||||
const payload = new FormData();
|
||||
payload.append("fileToUpload", imageFile);
|
||||
const response = await fetch("https://nostr.build/upload.php", { body: payload, method: "POST" }).then((res) =>
|
||||
res.text()
|
||||
res.text(),
|
||||
);
|
||||
const imageUrl = response.match(/https:\/\/nostr\.build\/i\/[\w.]+/)?.[0];
|
||||
if (imageUrl) {
|
||||
|
@ -28,7 +28,7 @@ function RelayPickerModal({
|
||||
}: { onSelect: (relay: string) => void } & Omit<ModalProps, "children">) {
|
||||
const [search, setSearch] = useState("");
|
||||
const { value: onlineRelays } = useAsync(async () =>
|
||||
fetch("https://api.nostr.watch/v1/online").then((res) => res.json() as Promise<string[]>)
|
||||
fetch("https://api.nostr.watch/v1/online").then((res) => res.json() as Promise<string[]>),
|
||||
);
|
||||
const relayList = unique(onlineRelays ?? []);
|
||||
|
||||
@ -78,7 +78,7 @@ export const RelayUrlInput = forwardRef(
|
||||
({ onChange, ...props }: Omit<RelayUrlInputProps, "onChange"> & { onChange: (url: string) => void }, ref) => {
|
||||
const { isOpen, onClose, onOpen } = useDisclosure();
|
||||
const { value: relaysJson } = useAsync(async () =>
|
||||
fetch("https://api.nostr.watch/v1/online").then((res) => res.json() as Promise<string[]>)
|
||||
fetch("https://api.nostr.watch/v1/online").then((res) => res.json() as Promise<string[]>),
|
||||
);
|
||||
const relaySuggestions = unique(relaysJson ?? []);
|
||||
|
||||
@ -100,5 +100,5 @@ export const RelayUrlInput = forwardRef(
|
||||
<RelayPickerModal onClose={onClose} isOpen={isOpen} onSelect={(url) => onChange(url)} size="2xl" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
@ -21,7 +21,7 @@ export function useTimelinePageEventFilter() {
|
||||
if (view === "images" && !event.content.match(matchImageUrls)) return false;
|
||||
return true;
|
||||
},
|
||||
[view]
|
||||
[view],
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ export default function useAppSettings() {
|
||||
if (e instanceof Error) toast({ description: e.message, status: "error" });
|
||||
}
|
||||
},
|
||||
[settings]
|
||||
[settings],
|
||||
);
|
||||
|
||||
return {
|
||||
|
@ -8,7 +8,7 @@ export default function useEventReactions(eventId: string, additionalRelays: str
|
||||
|
||||
const subject = useMemo(
|
||||
() => eventReactionsService.requestReactions(eventId, relays, alwaysFetch),
|
||||
[eventId, relays.join("|"), alwaysFetch]
|
||||
[eventId, relays.join("|"), alwaysFetch],
|
||||
);
|
||||
|
||||
return useSubject(subject);
|
||||
|
@ -9,7 +9,7 @@ export default function useEventZaps(eventId: string, additionalRelays: string[]
|
||||
|
||||
const subject = useMemo(
|
||||
() => eventZapsService.requestZaps(eventId, relays, alwaysFetch),
|
||||
[eventId, relays.join("|"), alwaysFetch]
|
||||
[eventId, relays.join("|"), alwaysFetch],
|
||||
);
|
||||
|
||||
const events = useSubject(subject) || [];
|
||||
|
@ -12,7 +12,7 @@ export function usePaginatedList<T extends unknown>(list: T[], opts?: Options) {
|
||||
const previous = useCallback(() => setPage((v) => Math.max(v - 1, 0)), [setPage]);
|
||||
const pageItems = useMemo(
|
||||
() => list.slice(pageSize * currentPage, pageSize * currentPage + pageSize),
|
||||
[list, currentPage, pageSize]
|
||||
[list, currentPage, pageSize],
|
||||
);
|
||||
|
||||
return {
|
||||
|
@ -22,6 +22,6 @@ export function useTimelineCurserIntersectionCallback(timeline: TimelineLoader)
|
||||
}
|
||||
}
|
||||
},
|
||||
[timeline]
|
||||
[timeline],
|
||||
);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import useSubject from "./use-subject";
|
||||
export function useUserContacts(pubkey: string, relays: string[], alwaysRequest = false) {
|
||||
const observable = useMemo(
|
||||
() => userContactsService.requestContacts(pubkey, relays, alwaysRequest),
|
||||
[pubkey, relays.join("|"), alwaysRequest]
|
||||
[pubkey, relays.join("|"), alwaysRequest],
|
||||
);
|
||||
const contacts = useSubject(observable);
|
||||
|
||||
|
@ -7,7 +7,7 @@ export default function useUserLNURLMetadata(pubkey: string) {
|
||||
const address = userMetadata?.lud16 || userMetadata?.lud06;
|
||||
const { value: metadata } = useAsync(
|
||||
async () => (address ? lnurlMetadataService.requestMetadata(address) : undefined),
|
||||
[address]
|
||||
[address],
|
||||
);
|
||||
|
||||
return { metadata, address };
|
||||
|
@ -8,7 +8,7 @@ export function useUserMetadata(pubkey: string, additionalRelays: string[] = [],
|
||||
|
||||
const subject = useMemo(
|
||||
() => userMetadataService.requestMetadata(pubkey, relays, alwaysRequest),
|
||||
[pubkey, relays, alwaysRequest]
|
||||
[pubkey, relays, alwaysRequest],
|
||||
);
|
||||
const metadata = useSubject(subject);
|
||||
|
||||
|
@ -7,7 +7,7 @@ export function useUserRelays(pubkey: string, additionalRelays: string[] = [], a
|
||||
const relays = useReadRelayUrls(additionalRelays);
|
||||
const subject = useMemo(
|
||||
() => userRelaysService.requestRelays(pubkey, relays, alwaysRequest),
|
||||
[pubkey, relays.join("|"), alwaysRequest]
|
||||
[pubkey, relays.join("|"), alwaysRequest],
|
||||
);
|
||||
const userRelays = useSubject(subject);
|
||||
|
||||
|
@ -23,5 +23,5 @@ const root = createRoot(element);
|
||||
root.render(
|
||||
<GlobalProviders>
|
||||
<App />
|
||||
</GlobalProviders>
|
||||
</GlobalProviders>,
|
||||
);
|
||||
|
@ -38,7 +38,7 @@ const mediaMapper = (item: ImageObject[] | VideoObject[]) => ({
|
||||
|
||||
const mediaSorter = (
|
||||
a: ImageObject | TwitterImageObject | VideoObject | TwitterPlayerObject,
|
||||
b: ImageObject | TwitterImageObject | VideoObject | TwitterPlayerObject
|
||||
b: ImageObject | TwitterImageObject | VideoObject | TwitterPlayerObject,
|
||||
) => {
|
||||
if (!(a.url && b.url)) {
|
||||
return 0;
|
||||
@ -114,7 +114,7 @@ export function mediaSetup(ogObject: OgObjectInteral) {
|
||||
ogObject.ogImageProperty,
|
||||
ogObject.ogImageWidth,
|
||||
ogObject.ogImageHeight,
|
||||
ogObject.ogImageType
|
||||
ogObject.ogImageType,
|
||||
)
|
||||
.map(mediaMapper)
|
||||
.filter((value: ImageObject) => value.url !== undefined && value.url !== "")
|
||||
@ -134,7 +134,7 @@ export function mediaSetup(ogObject: OgObjectInteral) {
|
||||
ogObject.ogVideoProperty,
|
||||
ogObject.ogVideoWidth,
|
||||
ogObject.ogVideoHeight,
|
||||
ogObject.ogVideoType
|
||||
ogObject.ogVideoType,
|
||||
)
|
||||
.map(mediaMapper)
|
||||
.filter((value: VideoObject) => value.url !== undefined && value.url !== "")
|
||||
@ -164,7 +164,7 @@ export function mediaSetup(ogObject: OgObjectInteral) {
|
||||
ogObject.twitterImageProperty,
|
||||
ogObject.twitterImageWidth,
|
||||
ogObject.twitterImageHeight,
|
||||
ogObject.twitterImageAlt
|
||||
ogObject.twitterImageAlt,
|
||||
)
|
||||
.map(mediaMapperTwitterImage)
|
||||
.filter((value: TwitterImageObject) => value.url !== undefined && value.url !== "")
|
||||
@ -189,7 +189,7 @@ export function mediaSetup(ogObject: OgObjectInteral) {
|
||||
ogObject.twitterPlayerProperty,
|
||||
ogObject.twitterPlayerWidth,
|
||||
ogObject.twitterPlayerHeight,
|
||||
ogObject.twitterPlayerStream
|
||||
ogObject.twitterPlayerStream,
|
||||
)
|
||||
.map(mediaMapperTwitterPlayer)
|
||||
.filter((value: TwitterPlayerObject) => value.url !== undefined && value.url !== "")
|
||||
|
@ -83,7 +83,7 @@ export class QrCode {
|
||||
minVersion: int = 1,
|
||||
maxVersion: int = 40,
|
||||
mask: int = -1,
|
||||
boostEcl: boolean = true
|
||||
boostEcl: boolean = true,
|
||||
): QrCode {
|
||||
if (
|
||||
!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION) ||
|
||||
@ -175,7 +175,7 @@ export class QrCode {
|
||||
|
||||
dataCodewords: Readonly<Array<byte>>,
|
||||
|
||||
msk: int
|
||||
msk: int,
|
||||
) {
|
||||
// Check scalar arguments
|
||||
if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION)
|
||||
@ -822,7 +822,7 @@ export class QrSegment {
|
||||
public readonly numChars: int,
|
||||
|
||||
// The data bits of this segment. Accessed through getData().
|
||||
private readonly bitData: Array<bit>
|
||||
private readonly bitData: Array<bit>,
|
||||
) {
|
||||
if (numChars < 0) throw new RangeError("Invalid argument");
|
||||
this.bitData = bitData.slice(); // Make defensive copy
|
||||
@ -897,7 +897,7 @@ export class Ecc {
|
||||
// In the range 0 to 3 (unsigned 2-bit integer).
|
||||
public readonly ordinal: int,
|
||||
// (Package-private) In the range 0 to 3 (unsigned 2-bit integer).
|
||||
public readonly formatBits: int
|
||||
public readonly formatBits: int,
|
||||
) {}
|
||||
}
|
||||
// }
|
||||
@ -925,7 +925,7 @@ export class Mode {
|
||||
// The mode indicator bits, which is a uint4 value (range 0 to 15).
|
||||
public readonly modeBits: int,
|
||||
// Number of character count bits for three different version ranges.
|
||||
private readonly numBitsCharCount: [int, int, int]
|
||||
private readonly numBitsCharCount: [int, int, int],
|
||||
) {}
|
||||
|
||||
/*-- Method --*/
|
||||
|
@ -19,7 +19,7 @@ const IntersectionObserverContext = createContext<{
|
||||
export type ExtendedIntersectionObserverEntry<T> = { entry: IntersectionObserverEntry; id: T | undefined };
|
||||
export type ExtendedIntersectionObserverCallback<T> = (
|
||||
entries: ExtendedIntersectionObserverEntry<T>[],
|
||||
observer: IntersectionObserver
|
||||
observer: IntersectionObserver,
|
||||
) => void;
|
||||
|
||||
export function useIntersectionObserver() {
|
||||
@ -42,7 +42,7 @@ export function useRegisterIntersectionEntity<T>(ref: MutableRefObject<Element |
|
||||
|
||||
export function useIntersectionMapCallback<T>(
|
||||
callback: (map: Map<T, IntersectionObserverEntry>) => void,
|
||||
watch: DependencyList
|
||||
watch: DependencyList,
|
||||
) {
|
||||
const map = useMemo(() => new Map<T, IntersectionObserverEntry>(), []);
|
||||
return useCallback<ExtendedIntersectionObserverCallback<T>>(
|
||||
@ -53,7 +53,7 @@ export function useIntersectionMapCallback<T>(
|
||||
|
||||
callback(map);
|
||||
},
|
||||
[callback, ...watch]
|
||||
[callback, ...watch],
|
||||
);
|
||||
}
|
||||
|
||||
@ -76,11 +76,11 @@ export default function IntersectionObserverProvider<T = undefined>({
|
||||
entries.map((entry) => {
|
||||
return { entry, id: elementIds.get(entry.target) };
|
||||
}),
|
||||
observer
|
||||
observer,
|
||||
);
|
||||
}, []);
|
||||
const [observer, setObserver] = useState<IntersectionObserver>(
|
||||
() => new IntersectionObserver(handleIntersection, { rootMargin, threshold })
|
||||
() => new IntersectionObserver(handleIntersection, { rootMargin, threshold }),
|
||||
);
|
||||
|
||||
useMount(() => {
|
||||
@ -97,7 +97,7 @@ export default function IntersectionObserverProvider<T = undefined>({
|
||||
(element: Element, id: T) => {
|
||||
elementIds.set(element, id);
|
||||
},
|
||||
[elementIds]
|
||||
[elementIds],
|
||||
);
|
||||
|
||||
const context = useMemo(
|
||||
@ -105,7 +105,7 @@ export default function IntersectionObserverProvider<T = undefined>({
|
||||
observer,
|
||||
setElementId,
|
||||
}),
|
||||
[observer, setElementId]
|
||||
[observer, setElementId],
|
||||
);
|
||||
|
||||
return <IntersectionObserverContext.Provider value={context}>{children}</IntersectionObserverContext.Provider>;
|
||||
|
@ -20,7 +20,7 @@ export default function PostModalProvider({ children }: PropsWithChildren) {
|
||||
setDraft(draft);
|
||||
onOpen();
|
||||
},
|
||||
[setDraft, onOpen]
|
||||
[setDraft, onOpen],
|
||||
);
|
||||
const context = useMemo(() => ({ openModal }), [openModal]);
|
||||
|
||||
|
@ -40,7 +40,7 @@ export const SigningProvider = ({ children }: { children: React.ReactNode }) =>
|
||||
if (e instanceof Error) toast({ description: e.message, status: "error" });
|
||||
}
|
||||
},
|
||||
[toast, current]
|
||||
[toast, current],
|
||||
);
|
||||
const requestDecrypt = useCallback(
|
||||
async (data: string, pubkey: string) => {
|
||||
@ -51,7 +51,7 @@ export const SigningProvider = ({ children }: { children: React.ReactNode }) =>
|
||||
if (e instanceof Error) toast({ description: e.message, status: "error" });
|
||||
}
|
||||
},
|
||||
[toast, current]
|
||||
[toast, current],
|
||||
);
|
||||
const requestEncrypt = useCallback(
|
||||
async (data: string, pubkey: string) => {
|
||||
@ -62,12 +62,12 @@ export const SigningProvider = ({ children }: { children: React.ReactNode }) =>
|
||||
if (e instanceof Error) toast({ description: e.message, status: "error" });
|
||||
}
|
||||
},
|
||||
[toast, current]
|
||||
[toast, current],
|
||||
);
|
||||
|
||||
const context = useMemo(
|
||||
() => ({ requestSignature, requestDecrypt, requestEncrypt }),
|
||||
[requestSignature, requestDecrypt, requestEncrypt]
|
||||
[requestSignature, requestDecrypt, requestEncrypt],
|
||||
);
|
||||
|
||||
return <SigningContext.Provider value={context}>{children}</SigningContext.Provider>;
|
||||
|
@ -21,7 +21,7 @@ function handleNewContacts(contacts: UserContacts | undefined) {
|
||||
const relay = contacts.contactRelay[key];
|
||||
if (relay) return ["p", key, relay];
|
||||
else return ["p", key];
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
// reset the pending list since we just got a new contacts list
|
||||
@ -98,7 +98,7 @@ function addContact(pubkey: string, relay?: string) {
|
||||
return newTag;
|
||||
}
|
||||
return t;
|
||||
})
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
following.next([...pTags, newTag]);
|
||||
|
@ -23,14 +23,14 @@ class DirectMessagesService {
|
||||
this.incomingSub = new NostrMultiSubscription(
|
||||
clientRelaysService.getReadUrls(),
|
||||
undefined,
|
||||
"incoming-direct-messages"
|
||||
"incoming-direct-messages",
|
||||
);
|
||||
this.incomingSub.onEvent.subscribe(this.receiveEvent, this);
|
||||
|
||||
this.outgoingSub = new NostrMultiSubscription(
|
||||
clientRelaysService.getReadUrls(),
|
||||
undefined,
|
||||
"outgoing-direct-messages"
|
||||
"outgoing-direct-messages",
|
||||
);
|
||||
this.outgoingSub.onEvent.subscribe(this.receiveEvent, this);
|
||||
|
||||
|
@ -28,7 +28,7 @@ function getIdentityFromJson(name: string, domain: string, json: IdentityJson):
|
||||
|
||||
async function fetchAllIdentities(domain: string) {
|
||||
const json = await fetchWithCorsFallback(`//${domain}/.well-known/nostr.json`).then(
|
||||
(res) => res.json() as Promise<IdentityJson>
|
||||
(res) => res.json() as Promise<IdentityJson>,
|
||||
);
|
||||
|
||||
await addToCache(domain, json);
|
||||
@ -101,7 +101,7 @@ async function pruneCache() {
|
||||
const keys = await db.getAllKeysFromIndex(
|
||||
"dnsIdentifiers",
|
||||
"updated",
|
||||
IDBKeyRange.upperBound(dayjs().subtract(1, "day").unix())
|
||||
IDBKeyRange.upperBound(dayjs().subtract(1, "day").unix()),
|
||||
);
|
||||
|
||||
for (const pubkey of keys) {
|
||||
|
@ -86,7 +86,7 @@ class PubkeyRelayAssignmentService {
|
||||
if (userRelays.length === 0) userRelays = Array.from(readRelays);
|
||||
|
||||
const rankedOptions = Array.from(userRelays).sort(
|
||||
(a, b) => (relayScores.get(b) ?? 0) - (relayScores.get(a) ?? 0)
|
||||
(a, b) => (relayScores.get(b) ?? 0) - (relayScores.get(a) ?? 0),
|
||||
);
|
||||
|
||||
assignments[pubkey] = rankedOptions.slice(0, 3);
|
||||
|
@ -17,7 +17,7 @@ async function fetchInfo(relay: string) {
|
||||
url.protocol = url.protocol === "ws:" ? "http" : "https";
|
||||
|
||||
const infoDoc = await fetchWithCorsFallback(url, { headers: { Accept: "application/nostr+json" } }).then(
|
||||
(res) => res.json() as Promise<RelayInformationDocument>
|
||||
(res) => res.json() as Promise<RelayInformationDocument>,
|
||||
);
|
||||
|
||||
memoryCache.set(relay, infoDoc);
|
||||
|
@ -115,7 +115,7 @@ class ReplaceableEventRelayLoader {
|
||||
`Updating query`,
|
||||
Array.from(Object.keys(filters))
|
||||
.map((kind: string) => `kind ${kind}: ${filters[parseInt(kind)].authors?.length}`)
|
||||
.join(", ")
|
||||
.join(", "),
|
||||
);
|
||||
this.subscription.setQuery(query);
|
||||
|
||||
@ -133,7 +133,7 @@ class ReplaceableEventLoaderService {
|
||||
private events = new SuperMap<Pubkey, Subject<NostrEvent>>(() => new Subject<NostrEvent>());
|
||||
|
||||
private loaders = new SuperMap<Relay, ReplaceableEventRelayLoader>(
|
||||
(relay) => new ReplaceableEventRelayLoader(relay, this.log.extend(relay))
|
||||
(relay) => new ReplaceableEventRelayLoader(relay, this.log.extend(relay)),
|
||||
);
|
||||
|
||||
log = logger.extend("ReplaceableEventLoader");
|
||||
@ -180,7 +180,7 @@ class ReplaceableEventLoaderService {
|
||||
const keys = await db.getAllKeysFromIndex(
|
||||
"replaceableEvents",
|
||||
"created",
|
||||
IDBKeyRange.upperBound(dayjs().subtract(1, "day").unix())
|
||||
IDBKeyRange.upperBound(dayjs().subtract(1, "day").unix()),
|
||||
);
|
||||
|
||||
this.log(`Pruning ${keys.length} events`);
|
||||
@ -243,9 +243,12 @@ replaceableEventLoaderService.pruneCache();
|
||||
setInterval(() => {
|
||||
replaceableEventLoaderService.update();
|
||||
}, 1000 * 2);
|
||||
setInterval(() => {
|
||||
replaceableEventLoaderService.pruneCache();
|
||||
}, 1000 * 60 * 60);
|
||||
setInterval(
|
||||
() => {
|
||||
replaceableEventLoaderService.pruneCache();
|
||||
},
|
||||
1000 * 60 * 60,
|
||||
);
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
//@ts-ignore
|
||||
|
@ -11,7 +11,7 @@ const DTAG = "nostrudel-settings";
|
||||
|
||||
class UserAppSettings {
|
||||
private parsedSubjects = new SuperMap<string, PersistentSubject<AppSettings>>(
|
||||
() => new PersistentSubject<AppSettings>(defaultSettings)
|
||||
() => new PersistentSubject<AppSettings>(defaultSettings),
|
||||
);
|
||||
getSubject(pubkey: string) {
|
||||
return this.parsedSubjects.get(pubkey);
|
||||
|
@ -19,7 +19,7 @@ class SigningService {
|
||||
|
||||
private async getKeyMaterial() {
|
||||
const password = window.prompt(
|
||||
"Enter local encryption password. This password is used to keep your secret key save."
|
||||
"Enter local encryption password. This password is used to keep your secret key save.",
|
||||
);
|
||||
if (!password) throw new Error("Password required");
|
||||
const enc = new TextEncoder();
|
||||
@ -38,7 +38,7 @@ class SigningService {
|
||||
keyMaterial,
|
||||
{ name: "AES-GCM", length: 256 },
|
||||
true,
|
||||
["encrypt", "decrypt"]
|
||||
["encrypt", "decrypt"],
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -31,12 +31,15 @@ function parseContacts(event: NostrEvent): UserContacts {
|
||||
const relays = normalizeRelayConfigs(relayJsonToRelayConfig(relayJson));
|
||||
|
||||
const pubkeys = event.tags.filter(isPTag).map((tag) => tag[1]);
|
||||
const contactRelay = event.tags.filter(isPTag).reduce((dir, tag) => {
|
||||
if (tag[2]) {
|
||||
dir[tag[1]] = tag[2];
|
||||
}
|
||||
return dir;
|
||||
}, {} as Record<string, string>);
|
||||
const contactRelay = event.tags.filter(isPTag).reduce(
|
||||
(dir, tag) => {
|
||||
if (tag[2]) {
|
||||
dir[tag[1]] = tag[2];
|
||||
}
|
||||
return dir;
|
||||
},
|
||||
{} as Record<string, string>,
|
||||
);
|
||||
|
||||
return {
|
||||
pubkey: event.pubkey,
|
||||
@ -60,7 +63,7 @@ class UserContactsService {
|
||||
Kind.Contacts,
|
||||
pubkey,
|
||||
undefined,
|
||||
alwaysRequest
|
||||
alwaysRequest,
|
||||
);
|
||||
|
||||
sub.connectWithHandler(requestSub, (event, next) => next(parseContacts(event)));
|
||||
|
@ -32,7 +32,7 @@ class UserMetadataService {
|
||||
Kind.Metadata,
|
||||
pubkey,
|
||||
undefined,
|
||||
alwaysRequest
|
||||
alwaysRequest,
|
||||
);
|
||||
sub.connectWithHandler(requestSub, (event, next) => next(parseKind0Event(event)));
|
||||
return sub;
|
||||
|
@ -63,7 +63,7 @@ class UserTrustedStatsService {
|
||||
async fetchUserStats(pubkey: string) {
|
||||
try {
|
||||
const stats = await fetch(`https://api.nostr.band/v0/stats/profile/${pubkey}`).then(
|
||||
(res) => res.json() as Promise<{ stats: Record<string, NostrBandProfileStats> }>
|
||||
(res) => res.json() as Promise<{ stats: Record<string, NostrBandProfileStats> }>,
|
||||
);
|
||||
|
||||
if (stats?.stats[pubkey]) {
|
||||
|
@ -57,13 +57,13 @@ function HashTagPage() {
|
||||
if (!showReplies && isReply(event)) return false;
|
||||
return timelinePageEventFilter(event);
|
||||
},
|
||||
[showReplies]
|
||||
[showReplies],
|
||||
);
|
||||
const timeline = useTimelineLoader(
|
||||
`${hashtag}-hashtag`,
|
||||
readRelays,
|
||||
{ kinds: [1], "#t": [hashtag] },
|
||||
{ eventFilter }
|
||||
{ eventFilter },
|
||||
);
|
||||
|
||||
useRelaysChanged(readRelays, () => timeline.reset());
|
||||
|
@ -29,7 +29,7 @@ function FollowingTabBody() {
|
||||
if (!showReplies && isReply(event)) return false;
|
||||
return timelinePageEventFilter(event);
|
||||
},
|
||||
[showReplies, timelinePageEventFilter]
|
||||
[showReplies, timelinePageEventFilter],
|
||||
);
|
||||
|
||||
const following = contacts?.contacts || [];
|
||||
@ -37,7 +37,7 @@ function FollowingTabBody() {
|
||||
`${truncatedId(account.pubkey)}-following`,
|
||||
readRelays,
|
||||
{ authors: following, kinds: [Kind.Text, Kind.Repost, 2] },
|
||||
{ enabled: following.length > 0, eventFilter }
|
||||
{ enabled: following.length > 0, eventFilter },
|
||||
);
|
||||
|
||||
const header = (
|
||||
|
@ -24,7 +24,7 @@ function GlobalPage() {
|
||||
if (!showReplies && isReply(event)) return false;
|
||||
return timelineEventFilter(event);
|
||||
},
|
||||
[showReplies, timelineEventFilter]
|
||||
[showReplies, timelineEventFilter],
|
||||
);
|
||||
const timeline = useTimelineLoader(`global`, readRelays, { kinds: [1] }, { eventFilter });
|
||||
useRelaysChanged(readRelays, () => timeline.reset());
|
||||
|
@ -51,7 +51,7 @@ export default function LoginNip05View() {
|
||||
setLoading(false);
|
||||
},
|
||||
1000,
|
||||
[nip05, setPubkey, setRelays, setLoading]
|
||||
[nip05, setPubkey, setRelays, setLoading],
|
||||
);
|
||||
|
||||
const handleSubmit: React.FormEventHandler<HTMLDivElement> = (e) => {
|
||||
|
@ -62,7 +62,7 @@ export default function LoginNsecView() {
|
||||
setError(true);
|
||||
}
|
||||
},
|
||||
[setInputValue, setHexKey, setNpub, setError]
|
||||
[setInputValue, setHexKey, setNpub, setError],
|
||||
);
|
||||
|
||||
const handleSubmit: React.FormEventHandler<HTMLDivElement> = async (e) => {
|
||||
|
@ -104,7 +104,7 @@ export default function MapView() {
|
||||
const hash = ngeohash.encode(center.lat, center.lng, 5);
|
||||
|
||||
setSearchParams({ hash }, { replace: true });
|
||||
}, 1000)
|
||||
}, 1000),
|
||||
);
|
||||
|
||||
setMap(map);
|
||||
@ -122,7 +122,7 @@ export default function MapView() {
|
||||
"geo-events",
|
||||
readRelays,
|
||||
{ "#g": cells, kinds: [Kind.Text] },
|
||||
{ enabled: cells.length > 0 }
|
||||
{ enabled: cells.length > 0 },
|
||||
);
|
||||
|
||||
const setCellsFromMap = useCallback(() => {
|
||||
@ -133,7 +133,7 @@ export default function MapView() {
|
||||
bbox.getWest(),
|
||||
bbox.getNorth(),
|
||||
bbox.getEast(),
|
||||
getPrecision(map.getZoom())
|
||||
getPrecision(map.getZoom()),
|
||||
);
|
||||
|
||||
setCells(hashes);
|
||||
|
@ -206,7 +206,7 @@ export const ProfileEditView = () => {
|
||||
nip05: metadata?.nip05,
|
||||
lightningAddress: metadata?.lud16 || metadata?.lud06,
|
||||
}),
|
||||
[metadata]
|
||||
[metadata],
|
||||
);
|
||||
|
||||
const handleSubmit = async (data: FormData) => {
|
||||
|
@ -25,7 +25,7 @@ export default function RelaysView() {
|
||||
.map((r) => r.url)
|
||||
.filter(safeRelayUrl);
|
||||
const { value: onlineRelays = [] } = useAsync(async () =>
|
||||
fetch("https://api.nostr.watch/v1/online").then((res) => res.json() as Promise<string[]>)
|
||||
fetch("https://api.nostr.watch/v1/online").then((res) => res.json() as Promise<string[]>),
|
||||
);
|
||||
|
||||
const filteredRelays = useMemo(() => {
|
||||
|
@ -105,11 +105,7 @@ function RelayPage({ relay }: { relay: string }) {
|
||||
<RelayJoinAction url={relay} />
|
||||
</Flex>
|
||||
<RelayMetadata url={relay} />
|
||||
<Flex gap="2">
|
||||
{info?.supported_nips?.map((nip) => (
|
||||
<NipTag key={nip} nip={nip} />
|
||||
))}
|
||||
</Flex>
|
||||
<Flex gap="2">{info?.supported_nips?.map((nip) => <NipTag key={nip} nip={nip} />)}</Flex>
|
||||
<Tabs display="flex" flexDirection="column" flexGrow="1" isLazy colorScheme="brand">
|
||||
<TabList overflowX="auto" overflowY="hidden" flexShrink={0}>
|
||||
<Tab>Reviews</Tab>
|
||||
|
@ -87,7 +87,7 @@ function SearchResults({ search }: { search: string }) {
|
||||
`search`,
|
||||
searchRelays,
|
||||
{ search: search || "", kinds: [Kind.Metadata] },
|
||||
{ enabled: !!search }
|
||||
{ enabled: !!search },
|
||||
);
|
||||
|
||||
const events = useSubject(timeline?.timeline) ?? [];
|
||||
|
@ -27,7 +27,7 @@ function StreamsPage() {
|
||||
} catch (e) {}
|
||||
return false;
|
||||
},
|
||||
[filterStatus]
|
||||
[filterStatus],
|
||||
);
|
||||
|
||||
const { people } = usePeopleListContext();
|
||||
|
@ -152,7 +152,7 @@ export default function StreamView() {
|
||||
parsed.data.kind,
|
||||
parsed.data.pubkey,
|
||||
parsed.data.identifier,
|
||||
true
|
||||
true,
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
@ -71,7 +71,7 @@ export default function StreamChat({
|
||||
const muteList = useUserMuteList(account?.pubkey);
|
||||
const mutedPubkeys = useMemo(
|
||||
() => [...(hostMuteList?.tags ?? []), ...(muteList?.tags ?? [])].filter(isPTag).map((t) => t[1] as string),
|
||||
[hostMuteList, muteList]
|
||||
[hostMuteList, muteList],
|
||||
);
|
||||
const eventFilter = useCallback((event: NostrEvent) => !mutedPubkeys.includes(event.pubkey), [mutedPubkeys]);
|
||||
|
||||
@ -82,7 +82,7 @@ export default function StreamChat({
|
||||
"#a": [getATag(stream)],
|
||||
kinds: [STREAM_CHAT_MESSAGE_KIND, Kind.Zap],
|
||||
},
|
||||
{ eventFilter }
|
||||
{ eventFilter },
|
||||
);
|
||||
|
||||
const events = useSubject(timeline.timeline).sort((a, b) => b.created_at - a.created_at);
|
||||
@ -153,7 +153,7 @@ export default function StreamChat({
|
||||
<ChatMessage key={event.id} event={event} stream={stream} />
|
||||
) : (
|
||||
<ZapMessage key={event.id} zap={event} stream={stream} />
|
||||
)
|
||||
),
|
||||
)}
|
||||
</Flex>
|
||||
{!isChatLog && (
|
||||
|
@ -25,7 +25,7 @@ export default function UserNotesTab() {
|
||||
if (hideReposts && isRepost(event)) return false;
|
||||
return timelineEventFilter(event);
|
||||
},
|
||||
[showReplies, hideReposts, timelineEventFilter]
|
||||
[showReplies, hideReposts, timelineEventFilter],
|
||||
);
|
||||
const timeline = useTimelineLoader(
|
||||
truncatedId(pubkey) + "-notes",
|
||||
@ -34,7 +34,7 @@ export default function UserNotesTab() {
|
||||
authors: [pubkey],
|
||||
kinds: [Kind.Text, Kind.Repost, STREAM_KIND, 2],
|
||||
},
|
||||
{ eventFilter }
|
||||
{ eventFilter },
|
||||
);
|
||||
|
||||
const header = (
|
||||
|
@ -87,14 +87,14 @@ const UserZapsTab = () => {
|
||||
}
|
||||
return true;
|
||||
},
|
||||
[filter]
|
||||
[filter],
|
||||
);
|
||||
|
||||
const timeline = useTimelineLoader(
|
||||
`${truncatedId(pubkey)}-zaps`,
|
||||
relays,
|
||||
{ "#p": [pubkey], kinds: [9735] },
|
||||
{ eventFilter }
|
||||
{ eventFilter },
|
||||
);
|
||||
|
||||
const events = useSubject(timeline.timeline);
|
||||
|
Loading…
x
Reference in New Issue
Block a user