removed warnings

This commit is contained in:
Claudio Maggioni (maggicl) 2020-04-28 12:02:46 +02:00
parent b0b281263e
commit b9be38d467
2 changed files with 4 additions and 7 deletions

View file

@ -1,9 +1,7 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { Button, Header, Modal, Icon, Responsive } from "semantic-ui-react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { RemoteService } from "../remote"; import { RemoteService } from "../remote";
import { appActions } from "../storeActions"; import { appActions } from "../storeActions";
//import { update } from "immutability-helper";
class AutomationModal extends Component { class AutomationModal extends Component {
constructor(props) { constructor(props) {

View file

@ -16,7 +16,6 @@ import {
Divider, Divider,
Checkbox, Checkbox,
Menu, Menu,
Label,
} from "semantic-ui-react"; } from "semantic-ui-react";
const operands = [ const operands = [
@ -157,7 +156,7 @@ const SceneItem = (props) => {
}; };
const Trigger = ({ deviceName, trigger, onRemove, index }) => { const Trigger = ({ deviceName, trigger, onRemove, index }) => {
const { device, operand, value } = trigger; const { operand, value } = trigger;
let symbol; let symbol;
if (operand) { if (operand) {
symbol = operands.filter((opt) => opt.key === operand)[0].text; symbol = operands.filter((opt) => opt.key === operand)[0].text;
@ -273,7 +272,7 @@ export const CreateAutomation = (props) => {
return trigger.device + trigger.value; return trigger.device + trigger.value;
}; };
const checkBeforeSave = () => { /*const checkBeforeSave = () => {
if (automationName.length <= 0) { if (automationName.length <= 0) {
alert("Give a name to the automation"); alert("Give a name to the automation");
return false; return false;
@ -287,7 +286,7 @@ export const CreateAutomation = (props) => {
return false; return false;
} }
return true; return true;
}; };*/
const saveAutomation = () => { const saveAutomation = () => {
//if(checkBeforeSave()){ //if(checkBeforeSave()){
@ -408,7 +407,7 @@ const Automation = ({ automation, devices, scenes, removeAutomation }) => {
const { triggers } = automation; const { triggers } = automation;
const scenePriorities = automation.scenes; const scenePriorities = automation.scenes;
const getOperator = (operand) => const getOperator = (operand) =>
operands.filter((o) => o.key == operand)[0].text; operands.filter((o) => o.key === operand)[0].text;
return ( return (
<React.Fragment> <React.Fragment>