chore: show npub in profile page
All checks were successful
Release / build_and_release (push) Successful in 42s
All checks were successful
Release / build_and_release (push) Successful in 42s
This commit is contained in:
parent
6981bef65a
commit
a9bdd1f95e
@ -14,6 +14,7 @@ import { LoadingButton } from '@mui/lab'
|
||||
import { Dispatch } from '../../store/store'
|
||||
import { setMetadataEvent } from '../../store/actions'
|
||||
import { LoadingSpinner } from '../../components/LoadingSpinner'
|
||||
import { LoginMethods } from '../../store/auth/types'
|
||||
|
||||
export const ProfilePage = () => {
|
||||
const { npub } = useParams()
|
||||
@ -28,7 +29,7 @@ export const ProfilePage = () => {
|
||||
const [savingProfileMetadata, setSavingProfileMetadata] = useState(false)
|
||||
const metadataState = useSelector((state: State) => state.metadata)
|
||||
const keys = useSelector((state: State) => state.auth?.keyPair)
|
||||
const usersPubkey = useSelector((state: State) => state.auth.usersPubkey)
|
||||
const { usersPubkey, loginMethod } = useSelector((state: State) => state.auth)
|
||||
|
||||
const [isUsersOwnProfile, setIsUsersOwnProfile] = useState(false)
|
||||
|
||||
@ -226,10 +227,10 @@ export const ProfilePage = () => {
|
||||
{editItem('about', 'About', true, 4)}
|
||||
{isUsersOwnProfile && (
|
||||
<>
|
||||
{keys &&
|
||||
keys.public &&
|
||||
copyItem(nip19.npubEncode(keys.public), 'Public Key')}
|
||||
{keys &&
|
||||
{usersPubkey &&
|
||||
copyItem(nip19.npubEncode(usersPubkey), 'Public Key')}
|
||||
{loginMethod === LoginMethods.privateKey &&
|
||||
keys &&
|
||||
keys.private &&
|
||||
copyItem(
|
||||
'••••••••••••••••••••••••••••••••••••••••••••••••••',
|
||||
|
Loading…
Reference in New Issue
Block a user