RegistrationForm: improve error text

This commit is contained in:
Alex Gleason 2022-05-06 17:24:02 -05:00
parent f0cb0d5594
commit 907ccd9e24
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -10,7 +10,7 @@ import { accountLookup } from 'soapbox/actions/accounts';
import { register, verifyCredentials } from 'soapbox/actions/auth';
import { openModal } from 'soapbox/actions/modals';
import BirthdayInput from 'soapbox/components/birthday_input';
import { Form, FormGroup, FormActions, Button, Input, Textarea } from 'soapbox/components/ui';
import { Form, FormGroup, FormActions, Button, Input, Textarea, Text } from 'soapbox/components/ui';
import CaptchaField from 'soapbox/features/auth_login/components/captcha';
import { Checkbox } from 'soapbox/features/forms';
import { useAppSelector, useAppDispatch, useSettings, useFeatures } from 'soapbox/hooks';
@ -229,9 +229,9 @@ const RegistrationForm: React.FC<IRegistrationForm> = ({ inviteToken }) => {
<Form onSubmit={onSubmit} data-testid='registrations-open'>
<fieldset disabled={isLoading} className='space-y-3'>
{usernameUnavailable && (
<div className='error'>
<Text size='sm' theme='danger'>
<FormattedMessage id='registration.username_unavailable' defaultMessage='Username is already taken.' />
</div>
</Text>
)}
<FormGroup hintText={intl.formatMessage(messages.username_hint)}>