update splash screen
This commit is contained in:
@@ -9,6 +9,7 @@ export function useAccount() {
|
||||
['currentAccount'],
|
||||
async () => {
|
||||
const account = await getActiveAccount();
|
||||
console.log('active account: ', account);
|
||||
if (account?.pubkey) {
|
||||
const user = ndk.getUser({ hexpubkey: account?.pubkey });
|
||||
await user.fetchProfile();
|
||||
@@ -17,6 +18,7 @@ export function useAccount() {
|
||||
return account;
|
||||
},
|
||||
{
|
||||
enabled: !!ndk,
|
||||
staleTime: Infinity,
|
||||
refetchOnMount: false,
|
||||
refetchOnWindowFocus: false,
|
||||
|
||||
@@ -70,6 +70,8 @@ export function useNostr() {
|
||||
|
||||
async function fetchNotes(prevFollow?: string[]) {
|
||||
try {
|
||||
if (!ndk) return { status: 'failed', message: 'NDK instance not found' };
|
||||
|
||||
const network = await fetchNetwork(prevFollow);
|
||||
const totalNotes = await countTotalNotes();
|
||||
const lastLogin = await getLastLogin();
|
||||
@@ -112,6 +114,8 @@ export function useNostr() {
|
||||
|
||||
async function fetchChats() {
|
||||
try {
|
||||
if (!ndk) return { status: 'failed', message: 'NDK instance not found' };
|
||||
|
||||
const lastLogin = await getLastLogin();
|
||||
const incomingMessages = await fetcher.fetchAllEvents(
|
||||
relayUrls,
|
||||
|
||||
Reference in New Issue
Block a user