diff --git a/smart-hut/public/img/room_404_meme/1.jpeg b/smart-hut/public/img/room_404_meme/1.jpeg new file mode 100644 index 0000000..b039f37 Binary files /dev/null and b/smart-hut/public/img/room_404_meme/1.jpeg differ diff --git a/smart-hut/public/img/room_404_meme/10.jpg b/smart-hut/public/img/room_404_meme/10.jpg new file mode 100644 index 0000000..d1b2abd Binary files /dev/null and b/smart-hut/public/img/room_404_meme/10.jpg differ diff --git a/smart-hut/public/img/room_404_meme/11.jpeg b/smart-hut/public/img/room_404_meme/11.jpeg new file mode 100644 index 0000000..0675dac Binary files /dev/null and b/smart-hut/public/img/room_404_meme/11.jpeg differ diff --git a/smart-hut/public/img/room_404_meme/12.gif b/smart-hut/public/img/room_404_meme/12.gif new file mode 100644 index 0000000..575dbac Binary files /dev/null and b/smart-hut/public/img/room_404_meme/12.gif differ diff --git a/smart-hut/public/img/room_404_meme/13.gif b/smart-hut/public/img/room_404_meme/13.gif new file mode 100644 index 0000000..94b389c Binary files /dev/null and b/smart-hut/public/img/room_404_meme/13.gif differ diff --git a/smart-hut/public/img/room_404_meme/14.gif b/smart-hut/public/img/room_404_meme/14.gif new file mode 100644 index 0000000..575599e Binary files /dev/null and b/smart-hut/public/img/room_404_meme/14.gif differ diff --git a/smart-hut/public/img/room_404_meme/2.jpeg b/smart-hut/public/img/room_404_meme/2.jpeg new file mode 100644 index 0000000..eb71f0b Binary files /dev/null and b/smart-hut/public/img/room_404_meme/2.jpeg differ diff --git a/smart-hut/public/img/room_404_meme/3.png b/smart-hut/public/img/room_404_meme/3.png new file mode 100644 index 0000000..8c2b210 Binary files /dev/null and b/smart-hut/public/img/room_404_meme/3.png differ diff --git a/smart-hut/public/img/room_404_meme/4.jpeg b/smart-hut/public/img/room_404_meme/4.jpeg new file mode 100644 index 0000000..413c5f3 Binary files /dev/null and b/smart-hut/public/img/room_404_meme/4.jpeg differ diff --git a/smart-hut/public/img/room_404_meme/5.jpeg b/smart-hut/public/img/room_404_meme/5.jpeg new file mode 100644 index 0000000..294fcb4 Binary files /dev/null and b/smart-hut/public/img/room_404_meme/5.jpeg differ diff --git a/smart-hut/public/img/room_404_meme/6.jpg b/smart-hut/public/img/room_404_meme/6.jpg new file mode 100644 index 0000000..e830719 Binary files /dev/null and b/smart-hut/public/img/room_404_meme/6.jpg differ diff --git a/smart-hut/public/img/room_404_meme/7.jpg b/smart-hut/public/img/room_404_meme/7.jpg new file mode 100644 index 0000000..358bec2 Binary files /dev/null and b/smart-hut/public/img/room_404_meme/7.jpg differ diff --git a/smart-hut/public/img/room_404_meme/8.jpg b/smart-hut/public/img/room_404_meme/8.jpg new file mode 100644 index 0000000..0f63a46 Binary files /dev/null and b/smart-hut/public/img/room_404_meme/8.jpg differ diff --git a/smart-hut/public/img/room_404_meme/9.jpeg b/smart-hut/public/img/room_404_meme/9.jpeg new file mode 100644 index 0000000..db5935a Binary files /dev/null and b/smart-hut/public/img/room_404_meme/9.jpeg differ diff --git a/smart-hut/src/components/modalform.js b/smart-hut/src/components/modalform.js index 3400d42..d54daff 100644 --- a/smart-hut/src/components/modalform.js +++ b/smart-hut/src/components/modalform.js @@ -7,7 +7,8 @@ export default class ModalWindow extends Component { constructor(props) { super(props); this.state = { - selectedIcon: 'home', + id : "", + selectedIcon: "", name: "", img: "", openModal: false @@ -23,14 +24,26 @@ export default class ModalWindow extends Component { "name" : this.state.name, "images" : this.state.img } - - console.log(this.props, data); this.props.addRoom(data); this.closeModal(); } + modifyRoomModal = (e) => { + let data = { + "icon" : this.state.selectedIcon, + "name" : this.state.name, + "images" : this.state.img + } + this.props.updateRoom(data); + this.closeModal(); + } + deleteRoom = (e) => { - console.log(e); + let data = { + "id" : this.state.id + } + this.props.deleteRoom(data); + this.closeModal(); } changeSomething = (event) => { @@ -49,7 +62,6 @@ export default class ModalWindow extends Component { } updateIcon(e) { - console.log(e); this.setState({selectedIcon : e}) } @@ -64,10 +76,16 @@ export default class ModalWindow extends Component { return (
Insert an image of the room:
Select an icon:
+ {this.props.selectedIcon == "new" ? "home" : this.props.idRoom.icon }