From 1d84f63dc4e2c6509cb6226cd06c12a68619117a Mon Sep 17 00:00:00 2001 From: Nik Tverd Date: Thu, 11 Jan 2024 16:38:41 +0600 Subject: [PATCH] fixup! feat: export InnerForm --- src/blocks/Form/Form.tsx | 3 +-- src/blocks/index.ts | 1 - src/{blocks/Form => components}/InnerForm/InnerForm.tsx | 6 +++--- src/components/index.ts | 1 + 4 files changed, 5 insertions(+), 6 deletions(-) rename src/{blocks/Form => components}/InnerForm/InnerForm.tsx (89%) diff --git a/src/blocks/Form/Form.tsx b/src/blocks/Form/Form.tsx index 4b7fe02eb..687c46d1b 100644 --- a/src/blocks/Form/Form.tsx +++ b/src/blocks/Form/Form.tsx @@ -1,6 +1,7 @@ import React, {useCallback, useContext, useState} from 'react'; import {BackgroundImage, Title} from '../../components'; +import InnerForm from '../../components/InnerForm/InnerForm'; import {MobileContext} from '../../context/mobileContext'; import {Col, Grid, GridAlignItems, GridColumnSize, Row} from '../../grid'; import type {FormBlockProps} from '../../models'; @@ -13,8 +14,6 @@ import { import {Content} from '../../sub-blocks'; import {block} from '../../utils'; -import InnerForm from './InnerForm/InnerForm'; - import './Form.scss'; const b = block('form-block'); diff --git a/src/blocks/index.ts b/src/blocks/index.ts index 2efe90c55..6ce472095 100644 --- a/src/blocks/index.ts +++ b/src/blocks/index.ts @@ -17,4 +17,3 @@ export {default as ContentLayoutBlock} from './ContentLayout/ContentLayout'; export {default as ShareBlock} from './Share/Share'; export {default as FilterBlock} from './FilterBlock/FilterBlock'; export {default as FormBlock} from './Form/Form'; -export {default as InnerForm} from './Form/InnerForm/InnerForm'; diff --git a/src/blocks/Form/InnerForm/InnerForm.tsx b/src/components/InnerForm/InnerForm.tsx similarity index 89% rename from src/blocks/Form/InnerForm/InnerForm.tsx rename to src/components/InnerForm/InnerForm.tsx index 42fdca190..18b723f18 100644 --- a/src/blocks/Form/InnerForm/InnerForm.tsx +++ b/src/components/InnerForm/InnerForm.tsx @@ -1,8 +1,8 @@ import React, {useEffect} from 'react'; -import {YandexForm} from '../../../components'; -import {FormBlockData, isHubspotDataForm, isYandexDataForm} from '../../../models'; -import {HubspotForm} from '../../../sub-blocks'; +import {YandexForm} from '..'; +import {FormBlockData, isHubspotDataForm, isYandexDataForm} from '../../models'; +import {HubspotForm} from '../../sub-blocks'; interface InnerFormProps { formData: FormBlockData; diff --git a/src/components/index.ts b/src/components/index.ts index b1b4e5410..a1694cfc1 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -35,6 +35,7 @@ export {default as HTML} from './HTML/HTML'; export {default as MetaInfo} from './MetaInfo/MetaInfo'; export {default as FullscreenMedia} from './FullscreenMedia/FullscreenMedia'; export {default as ContentList} from './ContentList/ContentList'; +export {default as InnerForm} from './InnerForm/InnerForm'; export type {RouterLinkProps} from './RouterLink/RouterLink'; export type {ImageBaseProps} from './ImageBase/ImageBase';