import { Component } from 'react';
import { observer, engineConfig } from '@ali/lowcode-editor-core';
import { Designer } from '../designer';
import { BuiltinSimulatorHostView } from '../builtin-simulator';
import './project.less';
class BuiltinLoading extends Component {
render() {
return (
);
}
}
@observer
export class ProjectView extends Component<{ designer: Designer }> {
componentDidMount() {
const { designer } = this.props;
const { project } = designer;
project.onRendererReady(() => {
this.forceUpdate();
});
}
render() {
const { designer } = this.props;
const { project } = designer;
const { simulatorProps } = project;
const Simulator = designer.simulatorComponent || BuiltinSimulatorHostView;
const Loading = engineConfig.get('loadingComponent', BuiltinLoading);
return (
{!project?.simulator?.renderer && }
);
}
}