Skip to content

Commit

Permalink
refactor(steps form): some refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderrudnik committed Feb 7, 2022
1 parent 229aae6 commit 623097a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/forms/StepForm/Steps/Step2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RadioButton, RadioGroup } from '@app/components/common/Radio/Radio';
import { DatePicker } from '@app/components/common/pickers/DatePicker';
import { Select, Option } from '@app/components/common/selects/Select/Select';
import * as S from '../StepForm.styles';
import React from 'react';

export const Step2: React.FC = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -61,7 +62,11 @@ export const Step2: React.FC = () => {
>
<DatePicker format="YYYY-MM-DD" />
</BaseForm.Item>
<S.PhoneItem name="phone" label={t('common.phone')} rules={[{ required: true, message: t('forms.stepFormLabels.phoneError') }]}>
<S.PhoneItem
name="phone"
label={t('common.phone')}
rules={[{ required: true, message: t('forms.stepFormLabels.phoneError') }]}
>
<Input addonBefore={prefixSelector} />
</S.PhoneItem>
<BaseForm.Item
Expand Down
7 changes: 6 additions & 1 deletion src/components/forms/StepForm/Steps/Step3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useTranslation } from 'react-i18next';
import { BaseForm } from '@app/components/common/forms/BaseForm/BaseForm';
import { Input } from '@app/components/common/inputs/Input/Input';
import * as S from '../StepForm.styles';
import React from 'react';

export const Step3: React.FC = () => {
const { t } = useTranslation();
Expand All @@ -28,7 +29,11 @@ export const Step3: React.FC = () => {
>
<Input />
</BaseForm.Item>
<BaseForm.Item name="city" label={t('common.city')} rules={[{ required: true, message: t('forms.stepFormLabels.cityError') }]}>
<BaseForm.Item
name="city"
label={t('common.city')}
rules={[{ required: true, message: t('forms.stepFormLabels.cityError') }]}
>
<Input />
</BaseForm.Item>
<BaseForm.Item
Expand Down

0 comments on commit 623097a

Please sign in to comment.