import React from 'react'; import { pick } from '@utils'; import { STATUS_CANVAS_SELECTED } from '@common/constants'; import withGGEditorContext from '@common/context/GGEditorContext/withGGEditorContext'; import Panel from './Panel'; class DetailPanel extends React.Component { state = { status: '', } constructor(props) { super(props); this.bindEvent(); } bindEvent() { const { onAfterAddPage } = this.props; onAfterAddPage(({ page }) => { this.setState({ status: STATUS_CANVAS_SELECTED, }); page.on('statuschange', ({ status }) => { this.setState({ status }); }); }); } render() { const { children } = this.props; const { status } = this.state; if (!status) { return null; } return (