Replaced usage of render() by their JSX constructor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Siklos 2022-08-05 16:23:33 +02:00
parent bc6d44db6a
commit b5aa002877
3 changed files with 13 additions and 12 deletions

View file

@ -22,15 +22,16 @@ const getDimensionsNodes = (root: ContainerModel): React.ReactNode[] => {
const y = -(GAP * (getDepth(container) + 1));
const strokeWidth = 1;
const text = width.toString();
const dimension = new Dimension({
id,
xStart,
xEnd,
y,
strokeWidth,
text
});
dimensions.push(dimension.render());
dimensions.push(
<Dimension
id={id}
xStart={xStart}
xEnd={xEnd}
y={y}
strokeWidth={strokeWidth}
text={text}
/>
);
}
return dimensions;
};