From 3e2cb19637f42c7383ed1ab2e4482d560670d6d0 Mon Sep 17 00:00:00 2001 From: mohiit1502 Date: Sun, 23 Jul 2023 03:46:17 +0530 Subject: [PATCH] Fixed TS issue for build --- src/app/components/Editor/Editor.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app/components/Editor/Editor.tsx b/src/app/components/Editor/Editor.tsx index f568248..a755e90 100755 --- a/src/app/components/Editor/Editor.tsx +++ b/src/app/components/Editor/Editor.tsx @@ -12,11 +12,11 @@ interface FrameContentDefinition { component: JSX.ElementType props?: { [key: string]: - | string - | number - | boolean - | { [key: string]: any } - | undefined + | string + | number + | boolean + | { [key: string]: any } + | undefined } data: { [key: string]: any } hierarchy: string @@ -35,9 +35,8 @@ const FrameContent = ( const SelectedComponent = component return SelectedComponent ? (
{ params.forEach((prop) => { const keyValue = prop.split("=") const name = keyValue && keyValue[0] - let value = keyValue && keyValue[1] + let value: string | boolean = keyValue && keyValue[1] value = value === "true" ? true : value value = value === "false" ? false : value if (prop && value && selectedItem) { @@ -113,7 +112,7 @@ const Editor = (): JSX.Element | string => { !selectedComponentDefinition || selectedComponentDefinition.componentName !== componentName || JSON.stringify(selectedComponentDefinition.props) !== - JSON.stringify(props) + JSON.stringify(props) ) { const SelectedComponent = Helper.importComponent( componentName,