import "./index.scss"; import * as React from "react"; import * as cx from "classnames"; import { Dispatch } from "redux"; import { Workspace } from "./workspace/view.pc"; import { Welcome } from "./welcome/view.pc"; import { RootState, isUnsaved, getBuildScriptProcess, RootReadyType } from "../../state"; import { Chrome } from "./chrome.pc"; export type RootOuterProps = { root: RootState; dispatch: Dispatch; }; export class RootComponent extends React.PureComponent { render() { const { root, dispatch } = this.props; // TODO - add loading state here if (root.readyType === RootReadyType.LOADING) { return null; } let content; const buildScriptProcess = getBuildScriptProcess(root); if (!root.projectInfo) { content = ( ); } else { content = (
); } if (root.customChrome) { content = ( ); } return content; } }