()
| 495 | private currentComponent: React.ComponentType | null = null; |
| 496 | |
| 497 | public getComponent(): React.ComponentType { |
| 498 | if (this.currentComponent) return this.currentComponent; |
| 499 | // eslint-disable-next-line @typescript-eslint/no-this-alias |
| 500 | const self = this; |
| 501 | this.currentComponent = class extends React.Component { |
| 502 | displayName = "ProjectContainer"; |
| 503 | private containerRef = React.createRef<HTMLDivElement>(); |
| 504 | |
| 505 | componentDidMount(): void { |
| 506 | (self as any)._lastContainer = this.containerRef.current; |
| 507 | if (this.containerRef.current && self.getService("canvas")) { |
| 508 | self.canvas.mount(this.containerRef.current); |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | render() { |
| 513 | return <div className="absolute inset-0 overflow-hidden" ref={this.containerRef}></div>; |
| 514 | } |
| 515 | }; |
| 516 | return this.currentComponent as React.ComponentType; |
| 517 | } |
| 518 | |
| 519 | render(): React.ReactNode { |
| 520 | return <div className="absolute inset-0 overflow-hidden" ref={this.containerRef}></div>; |
no outgoing calls
no test coverage detected