Allow the iframe to close the parent admin panel

This commit is contained in:
Ray Schamp 2018-12-06 15:06:21 -05:00
parent e41cd84f09
commit d243b5dad7

View file

@ -282,6 +282,8 @@ class Preview extends React.Component {
adminModalOpen: false
});
}
if (messageEvent.data === 'openPanel') this.handleOpenAdminPanel();
if (messageEvent.data === 'closePanel') this.handleCloseAdminPanel();
}
handleReportComment (id, topLevelCommentId) {
this.props.handleReportComment(this.state.projectId, id, topLevelCommentId, this.props.user.token);