import React, { Component } from "react"; import PropTypes from "prop-types"; import Modal from "./Modals/baseModal"; export default class EditMessageModal extends Component { static propTypes = { handleClose: PropTypes.func.isRequired, handleSave: PropTypes.func.isRequired, message: PropTypes.object.isRequired }; constructor(props) { super(props); this.state = { messageFrame: props.message.frame.copy() }; this.handleSave = this.handleSave.bind(this); this.editTransmitter = this.editTransmitter.bind(this); this.addTransmitter = this.addTransmitter.bind(this); this.renderActions = this.renderActions.bind(this); } handleSave() { this.props.handleSave(this.state.messageFrame); } addTransmitter() { const { messageFrame } = this.state; messageFrame.addTransmitter(); this.setState({ messageFrame }); } editTransmitter(transmitter) { return; } renderActions() { return (