Untitled

mail@pastecode.io avatar
unknown
javascript
17 days ago
328 B
2
Indexable
Never
  const handleImageClick = (id: number, index: number) => {
    setAvailableRoom((prevRooms: any) => prevRooms?.map((room: any) => (room.id === id ? { ...room, selected: !room.selected } : room)));
    setSelectedRoomIndex(id);
    socket.emit("hold", {
      date: toISOString(pickerDate.startDate),
      room: id
    });
  };
Leave a Comment