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 {
|
||||
syncState.current.set(pubkey, false);
|
||||
console.error('[NostrSync] All attempts failed for', pubkey.slice(0, 8));
|
||||
toast({
|
||||
title: 'Could not load profile',
|
||||
description: 'Check your internet connection and try refreshing.',
|
||||
variant: 'destructive',
|
||||
});
|
||||
// Don't show error toast if profile simply doesn't exist yet —
|
||||
// it's a new account, not a connection error
|
||||
if (!profileSynced) {
|
||||
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