From 63b9a93a16c3d82be72823b6c69010af2d8d4166 Mon Sep 17 00:00:00 2001 From: Chika Date: Wed, 1 Jun 2022 14:21:57 +0300 Subject: [PATCH] Calculation/Form: rename renderSections to renderElements --- Components/Calculation/Form/Leasing/index.jsx | 4 ++-- .../{layout/renderSections.tsx => lib/renderElements.tsx} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename Components/Calculation/{layout/renderSections.tsx => lib/renderElements.tsx} (91%) diff --git a/Components/Calculation/Form/Leasing/index.jsx b/Components/Calculation/Form/Leasing/index.jsx index 6295346..62a0fe5 100644 --- a/Components/Calculation/Form/Leasing/index.jsx +++ b/Components/Calculation/Form/Leasing/index.jsx @@ -1,8 +1,8 @@ -import renderSections from 'Components/Calculation/layout/renderSections'; +import renderElements from 'Components/Calculation/lib/renderElements'; import config from './config'; function Leasing() { - return renderSections(config); + return renderElements(config); } export default Leasing; diff --git a/Components/Calculation/layout/renderSections.tsx b/Components/Calculation/lib/renderElements.tsx similarity index 91% rename from Components/Calculation/layout/renderSections.tsx rename to Components/Calculation/lib/renderElements.tsx index 6760ced..1c2c74c 100644 --- a/Components/Calculation/layout/renderSections.tsx +++ b/Components/Calculation/lib/renderElements.tsx @@ -2,7 +2,7 @@ import { Box } from 'UIKit/grid'; import elementsRender from '../config/elements-render'; import type { SectionsConfig } from '../types/sections'; -function renderSections(config: SectionsConfig) { +function renderElements(config: SectionsConfig) { const rows = config.map(([elements, style], i) => { const renderedElements = elements.map((elementName) => { const render = elementsRender[elementName]?.render; @@ -38,4 +38,4 @@ function renderSections(config: SectionsConfig) { ); } -export default renderSections; +export default renderElements;