kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
ComposeForm: wrap NIP05 text in a <Warning /> component
rodzic
20cca0165b
commit
0207a29914
|
@ -45,8 +45,9 @@ const WarningWrapper: React.FC<IWarningWrapper> = ({ composeId }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (account?.source?.nostr?.nip05 === undefined) {
|
if (account?.source?.nostr?.nip05 === undefined) {
|
||||||
if (settingsNotifications.has('needsNip05')) {
|
|
||||||
return (
|
return (
|
||||||
|
<Warning
|
||||||
|
message={(settingsNotifications.has('needsNip05')) ? (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='compose_form.nip05.warning'
|
id='compose_form.nip05.warning'
|
||||||
defaultMessage={'You don\'t have a username configured. {click} to set one up.'}
|
defaultMessage={'You don\'t have a username configured. {click} to set one up.'}
|
||||||
|
@ -58,16 +59,15 @@ const WarningWrapper: React.FC<IWarningWrapper> = ({ composeId }) => {
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
) : (
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='compose_form.nip05.pending'
|
id='compose_form.nip05.pending'
|
||||||
defaultMessage='Your username request is under review.'
|
defaultMessage='Your username request is under review.'
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (needsLockWarning) {
|
if (needsLockWarning) {
|
||||||
return (
|
return (
|
||||||
|
|
Ładowanie…
Reference in New Issue