ComposeForm: wrap NIP05 text in a <Warning /> component

This commit is contained in:
Alex Gleason 2024-10-14 15:19:26 -05:00
parent 20cca0165b
commit 0207a29914
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 22 additions and 22 deletions

View File

@ -45,8 +45,9 @@ const WarningWrapper: React.FC<IWarningWrapper> = ({ composeId }) => {
}
if (account?.source?.nostr?.nip05 === undefined) {
if (settingsNotifications.has('needsNip05')) {
return (
<Warning
message={(settingsNotifications.has('needsNip05')) ? (
<FormattedMessage
id='compose_form.nip05.warning'
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
id='compose_form.nip05.pending'
defaultMessage='Your username request is under review.'
/>
)}
/>
);
}
}
if (needsLockWarning) {
return (