[PE mobile] Refactoring preview
This commit is contained in:
parent
1466cd61e4
commit
c7b2a9813d
|
@ -92,8 +92,7 @@ const PreviewController = props => {
|
||||||
// API Handlers
|
// API Handlers
|
||||||
|
|
||||||
const onEndDemonstration = () => {
|
const onEndDemonstration = () => {
|
||||||
if(props.previewVisible)
|
props.onclosed();
|
||||||
props.onClosePreview();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -70,7 +70,7 @@ class MainPage extends Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{this.state.previewVisible ? <Preview onClosePreview={this.onClosePreview} previewVisible={this.state.previewVisible} /> : null}
|
{!this.state.previewVisible ? null : <Preview onclosed={this.handleOptionsViewClosed.bind(this, 'preview')} />}
|
||||||
<Page name="home" className={showLogo && 'page-with-logo'}>
|
<Page name="home" className={showLogo && 'page-with-logo'}>
|
||||||
{/* Top Navbar */}
|
{/* Top Navbar */}
|
||||||
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
|
||||||
|
@ -101,10 +101,6 @@ class MainPage extends Component {
|
||||||
!this.state.collaborationVisible ? null :
|
!this.state.collaborationVisible ? null :
|
||||||
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||||
}
|
}
|
||||||
{
|
|
||||||
!this.state.previewVisible ? null :
|
|
||||||
<Preview onclosed={this.handleOptionsViewClosed.bind(this, 'preview')} />
|
|
||||||
}
|
|
||||||
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
|
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
|
||||||
</Page>
|
</Page>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
Loading…
Reference in a new issue