Replaced usage of render() by their JSX constructor
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
bc6d44db6a
commit
b5aa002877
3 changed files with 13 additions and 12 deletions
|
@ -14,7 +14,7 @@ export class Container extends React.Component<IContainerProps> {
|
|||
* @returns Render the container
|
||||
*/
|
||||
public render(): React.ReactNode {
|
||||
const containersElements = this.props.model.children.map(child => new Container({ model: child } as IContainerProps).render());
|
||||
const containersElements = this.props.model.children.map(child => <Container key={`container-${child.properties.id}`} model={child} />);
|
||||
const xText = Number(this.props.model.properties.width) / 2;
|
||||
const yText = Number(this.props.model.properties.height) / 2;
|
||||
const transform = `translate(${Number(this.props.model.properties.x)}, ${Number(this.props.model.properties.y)})`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue