import React, {useState} from "react"; import {Button, Col, Form, FormGroup, Input, Label, Modal, ModalBody, ModalFooter, ModalHeader} from "reactstrap"; import useGroups from "../../Hooks/group"; import Loading from "../Loading"; import {changeLight} from "../../Helpers/lights"; function LightPropertiesModal({id, gValue, nValue, onClose}) { const [groupId, setGroupId] = useState(gValue); const [name, setName] = useState(nValue); const groups = useGroups(); if (groups === null) { return ; } return ( Lysegenskaper
setName(e.target.value)} />
setGroupId(parseInt(e.target.value, 10))}> {groups.map(g => )}
{" "}
); } export default LightPropertiesModal;