@@ -9,7 +9,11 @@ const loadWidget = (component: any) => {
|
||||
const DeskWidget = React.forwardRef((props: any, ref) => {
|
||||
const widget = props
|
||||
const widgetProperties = widget['data-properties'] as IWidgetProperties
|
||||
const WidgetComponent = loadWidget(widgetProperties.id)
|
||||
|
||||
if (!widgetProperties) {
|
||||
return null
|
||||
}
|
||||
const WidgetComponent = loadWidget(widgetProperties?.id)
|
||||
return (
|
||||
<div ref={ref} {...props}>
|
||||
<Suspense fallback={<>Loading</>}>
|
||||
|
||||
@@ -47,7 +47,7 @@ const OpenPositonWidget = () => {
|
||||
form.riskLevel,
|
||||
false,
|
||||
form.stopLoss,
|
||||
form.takeProfit
|
||||
undefined
|
||||
)
|
||||
.then((result) => {
|
||||
t.update('success', 'Position created')
|
||||
|
||||
Reference in New Issue
Block a user