Fix profile qr code modal labels

This commit is contained in:
Bojan Mojsilovic 2024-04-05 15:26:08 +02:00
parent f4b3cf831e
commit 1411825f30
2 changed files with 7 additions and 10 deletions

View File

@ -18,7 +18,7 @@
.userInfo {
display: flex;
justify-content: flex-start;
align-items: flex-start;
align-items: flex-end;
.avatar {
display: flex;
@ -30,8 +30,8 @@
display: flex;
flex-direction: column;
margin-left: 8px;
justify-content: center;
height: 44px;
justify-content: space-between;
height: 40px;
.name {
display: flex;

View File

@ -30,20 +30,17 @@ const ProfileQrCodeModal: Component<{
onClose?: () => void,
}> = (props) => {
const toast = useToastContext();
const account = useAccountContext();
const intl = useIntl();
const settings = useSettingsContext();
const profileData = () => Object.entries({
pubkey: {
title: 'Public key',
data: `nostr:${props.profile.npub || hexToNpub(props.profile.pubkey)}`,
dataLabel: props.profile.npub || hexToNpub(props.profile.pubkey),
type: 'nostr',
},
lnAddress: {
title: 'Lightning address',
data: `lightning:${props.profile.lud16 || props.profile.lud06}`,
dataLabel: props.profile.lud16 || props.profile.lud06,
type: 'lightning',
}
});
@ -120,9 +117,9 @@ const ProfileQrCodeModal: Component<{
<div class={styles.value}>
<ButtonCopy
light={true}
copyValue={info.data}
copyValue={info.dataLabel}
labelBeforeIcon={true}
label={truncateNpub(info.data)}
label={truncateNpub(info.dataLabel)}
/>
</div>
</div>