Fix NostrSync error toast for accounts with no profile published yet
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
parent
6e46214747
commit
0f98994c86
1 changed files with 11 additions and 5 deletions
|
|
@ -215,11 +215,17 @@ export function NostrSync() {
|
||||||
} else {
|
} else {
|
||||||
syncState.current.set(pubkey, false);
|
syncState.current.set(pubkey, false);
|
||||||
console.error('[NostrSync] All attempts failed for', pubkey.slice(0, 8));
|
console.error('[NostrSync] All attempts failed for', pubkey.slice(0, 8));
|
||||||
toast({
|
// Don't show error toast if profile simply doesn't exist yet —
|
||||||
title: 'Could not load profile',
|
// it's a new account, not a connection error
|
||||||
description: 'Check your internet connection and try refreshing.',
|
if (!profileSynced) {
|
||||||
variant: 'destructive',
|
console.log('[NostrSync] No profile found — may be a new account');
|
||||||
});
|
} else {
|
||||||
|
toast({
|
||||||
|
title: 'Could not load profile',
|
||||||
|
description: 'Check your internet connection and try refreshing.',
|
||||||
|
variant: 'destructive',
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue