Skip to content

Commit

Permalink
uppdate
Browse files Browse the repository at this point in the history
  • Loading branch information
VazilX committed Jan 22, 2024
1 parent f73d430 commit f9721bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const TextField: React.FC<Props> = ({
const [id] = useState(() => `${name}-${getRandomDigits()}`);

// To show errors only if the field was touched (onBlur)
const [errorMaseg, setErrorMaseg] = useState('');
const [errorMasege, setErrorMaseg] = useState('');

// eslint-disable-next-line
const pattern = /^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@,.\w_]*)#?(?:[,.!/\\\w]*))?)$/;
Expand Down Expand Up @@ -67,7 +67,7 @@ export const TextField: React.FC<Props> = ({
id={id}
data-cy={`movie-${name}`}
className={classNames('input', {
'is-danger': errorMaseg,
'is-danger': errorMasege,
})}
placeholder={placeholder}
value={value}
Expand All @@ -77,8 +77,8 @@ export const TextField: React.FC<Props> = ({
/>
</div>

{errorMaseg && (
<p className="help is-danger">{errorMaseg}</p>
{errorMasege && (
<p className="help is-danger">{errorMasege}</p>
)}
</div>
);
Expand Down

0 comments on commit f9721bf

Please sign in to comment.