import { Connect } from "dob-react" import Render from "gaea-render" import * as _ from "lodash" import * as React from "react" import Icon from "../components/icon/src" import { Modal } from "../components/modal/src" import { StoreProps } from "../stores" import Viewport from "./viewport/viewport.component" class Props extends StoreProps { public componentClasses?: Array> = [] } class State { } import * as Styled from "./page.style" import { Switch } from "../components/switch/src" @Connect export default class Page extends React.Component { public static defaultProps = new Props() public state = new State() public render() { return ( {this.props.actions.ApplicationAction.loadPluginByPosition("navbarLeft")} {this.props.actions.ApplicationAction.loadPluginByPosition("navbarRight")} {this.props.actions.ApplicationAction.loadPluginByPosition("leftBarTop")} {this.props.actions.ApplicationAction.loadPluginByPosition("leftBarBottom")} {this.props.actions.ApplicationAction.loadPluginByPosition(`toolContainerLeft${_.upperFirst(_.camelCase(this.props.stores.ApplicationStore.leftTool))}`)} {this.props.actions.ApplicationAction.loadPluginByPosition(`toolContainerRight${_.upperFirst(_.camelCase(this.props.stores.ApplicationStore.rightTool))}`)} {this.props.actions.ApplicationAction.loadPluginByPosition("viewport")} {this.props.stores.ApplicationStore.isPreview && {this.props.actions.ApplicationAction.loadPluginByPosition("preview")} } {this.props.actions.ApplicationAction.loadPluginByPosition("bottomBar")} {this.props.actions.ApplicationAction.loadPluginByPosition("mainTool")} {this.props.stores.ApplicationStore.modalTitle} {this.props.actions.ApplicationAction.renderModalContent()} ) } private handleModalClick = () => { this.props.actions.ApplicationAction.closeModal() } }