feat: refactor

This commit is contained in:
2024-01-12 20:32:45 +07:00
parent 67c6177291
commit 0487b8a801
63 changed files with 345 additions and 777 deletions

View File

@@ -1,5 +1,6 @@
import { useArk, useStorage } from "@lume/ark";
import { useArk } from "@lume/ark";
import { CancelIcon, RefreshIcon } from "@lume/icons";
import { useStorage } from "@lume/storage";
import { NDKKind } from "@nostr-dev-kit/ndk";
import { useQuery } from "@tanstack/react-query";
import { RelayForm } from "./relayForm";
@@ -9,12 +10,12 @@ export function UserRelayList() {
const storage = useStorage();
const { status, data, refetch } = useQuery({
queryKey: ["relays", storage.account.pubkey],
queryKey: ["relays", ark.account.pubkey],
queryFn: async () => {
const event = await ark.getEventByFilter({
filter: {
kinds: [NDKKind.RelayList],
authors: [storage.account.pubkey],
authors: [ark.account.pubkey],
},
});