Merge branch 'fix-nip05-warn' into 'main'

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

See merge request soapbox-pub/soapbox!3158
environments/review-main-yi2y9f/deployments/4914
Alex Gleason 2024-10-14 20:35:29 +00:00
commit 80ed516f82
1 zmienionych plików z 22 dodań i 22 usunięć

Wyświetl plik

@ -45,28 +45,28 @@ const WarningWrapper: React.FC<IWarningWrapper> = ({ composeId }) => {
}
if (account?.source?.nostr?.nip05 === undefined) {
if (settingsNotifications.has('needsNip05')) {
return (
<FormattedMessage
id='compose_form.nip05.warning'
defaultMessage={'You don\'t have a username configured. {click} to set one up.'}
values={{
click: (
<Link to='/settings/identity'>
<FormattedMessage id='compose_form.nip05.warning.click' defaultMessage='Click here' />
</Link>
),
}}
/>
);
} else {
return (
<FormattedMessage
id='compose_form.nip05.pending'
defaultMessage='Your username request is under review.'
/>
);
}
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.'}
values={{
click: (
<Link to='/settings/identity'>
<FormattedMessage id='compose_form.nip05.warning.click' defaultMessage='Click here' />
</Link>
),
}}
/>
) : (
<FormattedMessage
id='compose_form.nip05.pending'
defaultMessage='Your username request is under review.'
/>
)}
/>
);
}
if (needsLockWarning) {