From 24947cc40bdce5e93e4643cd8214995950b7fa23 Mon Sep 17 00:00:00 2001 From: Chika Date: Sat, 9 Jul 2022 10:11:01 +0300 Subject: [PATCH] build: fix typescript errors --- Components/Calculation/Form/Insurance/InsuranceTable/types.ts | 2 +- Components/Calculation/lib/render-rows.tsx | 3 ++- Elements/Segmented.tsx | 2 +- next.config.js | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Components/Calculation/Form/Insurance/InsuranceTable/types.ts b/Components/Calculation/Form/Insurance/InsuranceTable/types.ts index 3805ba7..188e0dc 100644 --- a/Components/Calculation/Form/Insurance/InsuranceTable/types.ts +++ b/Components/Calculation/Form/Insurance/InsuranceTable/types.ts @@ -14,7 +14,7 @@ export type RowValues = { export type Values = Exclude; export type RowOptions = { - [ValueName in Values]?: BaseOption[]; + [ValueName in Values]?: BaseOption[]; } & { key: Keys }; export type RowStatuses = Record & { diff --git a/Components/Calculation/lib/render-rows.tsx b/Components/Calculation/lib/render-rows.tsx index 86f0a07..15ca96a 100644 --- a/Components/Calculation/lib/render-rows.tsx +++ b/Components/Calculation/lib/render-rows.tsx @@ -18,7 +18,8 @@ function renderFormRows(rowsConfig: FormTabRows) { const renderedElements = elements.map((elementName) => { const render = elementsRender[elementName]?.render; - return render(); + // eslint-disable-next-line object-curly-newline + return render({}); }); return ( diff --git a/Elements/Segmented.tsx b/Elements/Segmented.tsx index b2103eb..e43d3bd 100644 --- a/Elements/Segmented.tsx +++ b/Elements/Segmented.tsx @@ -29,4 +29,4 @@ export default (function Segmented({ /> ); -} as FC); +} as FC>); diff --git a/next.config.js b/next.config.js index fa82ad8..27c538d 100644 --- a/next.config.js +++ b/next.config.js @@ -13,6 +13,7 @@ const nextConfig = { compiler: { styledComponents: true, }, + pageExtensions: ['tsx', 'jsx'], async rewrites() { return [ {