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