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 { InfoIcon, LoaderIcon } from "@lume/icons";
import { useStorage } from "@lume/storage";
import { FETCH_LIMIT } from "@lume/utils";
import { NDKKind } from "@nostr-dev-kit/ndk";
import * as Switch from "@radix-ui/react-switch";
@@ -57,7 +58,7 @@ export function OnboardingScreen() {
setLoading(true);
// get account contacts
await ark.getUserContacts(storage.account.pubkey);
await ark.getUserContacts(ark.account.pubkey);
// refetch newsfeed
await queryClient.prefetchInfiniteQuery({
@@ -73,7 +74,7 @@ export function OnboardingScreen() {
const events = await ark.getInfiniteEvents({
filter: {
kinds: [NDKKind.Text, NDKKind.Repost],
authors: storage.account.contacts,
authors: ark.account.contacts,
},
limit: FETCH_LIMIT,
pageParam,