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 { Dispatch } from '../../store/store'
|
||||||
import { setMetadataEvent } from '../../store/actions'
|
import { setMetadataEvent } from '../../store/actions'
|
||||||
import { LoadingSpinner } from '../../components/LoadingSpinner'
|
import { LoadingSpinner } from '../../components/LoadingSpinner'
|
||||||
|
import { LoginMethods } from '../../store/auth/types'
|
||||||
|
|
||||||
export const ProfilePage = () => {
|
export const ProfilePage = () => {
|
||||||
const { npub } = useParams()
|
const { npub } = useParams()
|
||||||
@ -28,7 +29,7 @@ export const ProfilePage = () => {
|
|||||||
const [savingProfileMetadata, setSavingProfileMetadata] = useState(false)
|
const [savingProfileMetadata, setSavingProfileMetadata] = useState(false)
|
||||||
const metadataState = useSelector((state: State) => state.metadata)
|
const metadataState = useSelector((state: State) => state.metadata)
|
||||||
const keys = useSelector((state: State) => state.auth?.keyPair)
|
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)
|
const [isUsersOwnProfile, setIsUsersOwnProfile] = useState(false)
|
||||||
|
|
||||||
@ -226,10 +227,10 @@ export const ProfilePage = () => {
|
|||||||
{editItem('about', 'About', true, 4)}
|
{editItem('about', 'About', true, 4)}
|
||||||
{isUsersOwnProfile && (
|
{isUsersOwnProfile && (
|
||||||
<>
|
<>
|
||||||
{keys &&
|
{usersPubkey &&
|
||||||
keys.public &&
|
copyItem(nip19.npubEncode(usersPubkey), 'Public Key')}
|
||||||
copyItem(nip19.npubEncode(keys.public), 'Public Key')}
|
{loginMethod === LoginMethods.privateKey &&
|
||||||
{keys &&
|
keys &&
|
||||||
keys.private &&
|
keys.private &&
|
||||||
copyItem(
|
copyItem(
|
||||||
'••••••••••••••••••••••••••••••••••••••••••••••••••',
|
'••••••••••••••••••••••••••••••••••••••••••••••••••',
|
||||||
|
Loading…
Reference in New Issue
Block a user