feat: added caching using browsers built in index db #96

Merged
b merged 9 commits from issue-69 into staging 2024-05-31 11:38:20 +00:00
Showing only changes of commit ba1219b790 - Show all commits

View File

@ -28,6 +28,7 @@ import {
} from '../../routes'
import {
clearAuthToken,
hexToNpub,
saveNsecBunkerDelegatedKey,
shorten
} from '../../utils'
@ -60,13 +61,17 @@ export const AppBar = () => {
setUserAvatar(picture || userRobotImage)
}
setUsername(shorten(display_name || name || '', 7))
const npub = authState.usersPubkey
? hexToNpub(authState.usersPubkey)
: ''
setUsername(shorten(display_name || name || npub, 7))
} else {
setUserAvatar(userRobotImage || '')
setUsername('')
}
}
}, [metadataState, userRobotImage])
}, [metadataState, userRobotImage, authState.usersPubkey])
const handleOpenUserMenu = (event: React.MouseEvent<HTMLElement>) => {
setAnchorElUser(event.currentTarget)