Update position worker (#11)

* Update position worker

* Update todo
This commit is contained in:
Oda
2025-02-20 12:06:15 +07:00
committed by GitHub
parent d7731dda0e
commit 160fd02aac
9 changed files with 199 additions and 133 deletions

View File

@@ -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</>}>

View File

@@ -47,7 +47,7 @@ const OpenPositonWidget = () => {
form.riskLevel,
false,
form.stopLoss,
form.takeProfit
undefined
)
.then((result) => {
t.update('success', 'Position created')