Add comments to useLoginActions

This commit is contained in:
Alex Gleason committed 2025-04-17 18:15:10 -05:00
1 parent 3c5e6803b4
commit e081094cdf
2 files changed
+9 -4

No files matched your search

+4 -4
View File
@@ -10,14 +10,14 @@ export function useCurrentUser() {
const loginToUser = useCallback((login: NLoginType): NUser => {
switch (login.type) {
case 'nsec':
case 'nsec': // Nostr login with secret key
return NUser.fromNsecLogin(login);
case 'bunker':
case 'bunker': // Nostr login with NIP-46 "bunker://" URI
return NUser.fromBunkerLogin(login, nostr);
case 'extension':
case 'extension': // Nostr login with NIP-07 browser extension
return NUser.fromExtensionLogin(login);
// Other login types can be defined here
default:
// Learn how to define other login types: https://nostrify.dev/react/logins#custom-login-types
throw new Error(`Unsupported login type: ${login.type}`);
}
}, [nostr]);