diff --git a/smart-hut/src/components/RoomModal.js b/smart-hut/src/components/RoomModal.js index 653c763..b6d55d2 100644 --- a/smart-hut/src/components/RoomModal.js +++ b/smart-hut/src/components/RoomModal.js @@ -8,6 +8,7 @@ import { Icon, Responsive, Image, + Confirm, } from "semantic-ui-react"; import SelectIcons from "./SelectIcons"; import { connect } from "react-redux"; @@ -34,6 +35,7 @@ class RoomModal extends Component { name: this.type === "new" ? "New Room" : this.props.room.name, img: this.type === "new" ? null : this.props.room.image, openModal: false, + sure: false, }; } @@ -91,6 +93,14 @@ class RoomModal extends Component { .catch((err) => console.error("error in deleting room", err)); }; + setSureTrue = () => { + this.setState({sure: true}) + } + + setSureFalse= () => { + this.setState({sure: false}) + } + changeSomething = (event) => { let nam = event.target.name; let val = event.target.value; @@ -220,16 +230,22 @@ class RoomModal extends Component { {this.type === "modify" ? ( +
+ Delete Room + +
+ ) : null}