[PE mobile] Refactoring preview

This commit is contained in:
SergeyEzhin 2021-04-19 19:09:15 +03:00
parent 1466cd61e4
commit c7b2a9813d
2 changed files with 2 additions and 7 deletions

View file

@ -92,8 +92,7 @@ const PreviewController = props => {
// API Handlers
const onEndDemonstration = () => {
if(props.previewVisible)
props.onClosePreview();
props.onclosed();
};
return (

View file

@ -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>