Fixed TS issue for build

This commit is contained in:
2023-07-23 03:46:17 +05:30
parent bfc26ab695
commit 3e2cb19637

View File

@@ -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 ? (
<div
className={`ar-Editor__frame__main h-100 w-100 flex-center${
background ? " background" : ""
}`}
className={`ar-Editor__frame__main h-100 w-100 flex-center${background ? " background" : ""
}`}
style={{
// @ts-ignore
backgroundImage: background ? `url(${images[background]})` : "",
@@ -100,7 +99,7 @@ const Editor = (): JSX.Element | string => {
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,