Revert "Watcha op332 add a modal dialog for room creation (require matrix-react-sdk/pull/96) (#29)"
This reverts commit e6a431f4cf
.
develop
parent
e6a431f4cf
commit
fa60301d63
@ -1,37 +0,0 @@ |
||||
import React, { Component } from "react"; |
||||
import { withTranslation } from "react-i18next"; |
||||
import Modal from "react-bootstrap/Modal"; |
||||
|
||||
class NewRoomModal extends Component { |
||||
componentDidUpdate(prevProps) { |
||||
const { onHide, newRoomLocalEcho } = prevProps; |
||||
window.onstorage = event => { |
||||
if (event.key === "watcha_create_room") { |
||||
const roomProperties = event.newValue; |
||||
if (roomProperties === "null") { |
||||
onHide(); |
||||
} else if (roomProperties) { |
||||
newRoomLocalEcho(JSON.parse(roomProperties)); |
||||
onHide(); |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
|
||||
render() { |
||||
const { show, onHide, t } = this.props; |
||||
return ( |
||||
<Modal centered aria-label={t("button")} {...{ show, onHide }}> |
||||
{show && ( |
||||
<iframe |
||||
className="newRoomIframe" |
||||
title="Nextcloud" |
||||
src="/app/#/new" |
||||
/> |
||||
)} |
||||
</Modal> |
||||
); |
||||
} |
||||
} |
||||
|
||||
export default withTranslation("roomsTab")(NewRoomModal); |
Loading…
Reference in new issue