frontend: implementing distinction between int and float NumberComponent

This commit is contained in:
Mose Müller
2023-08-02 12:06:20 +02:00
parent 50162cdc82
commit 2a6574fea1
2 changed files with 18 additions and 36 deletions

View File

@ -133,23 +133,12 @@ const App = () => {
/>
</div>
);
} else if (value.type === 'int') {
return (
<div key={key}>
<NumberComponent
name={key}
parent_path="DataService"
docString={value.doc}
readOnly={value.readonly}
value={Number(value.value)}
/>
</div>
);
} else if (value.type === 'float') {
} else if (value.type === 'float' || value.type === 'int') {
return (
<div key={key}>
<NumberComponent
name={key}
type={value.type}
parent_path="DataService"
docString={value.doc}
readOnly={value.readonly}