Skip to content

Commit

Permalink
Fix lint and color when no value
Browse files Browse the repository at this point in the history
  • Loading branch information
callemand committed Sep 21, 2023
1 parent 6d80d1b commit 84dcf6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion front/src/components/boxs/room-humidity/RoomHumidity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const RoomHumidityBox = ({ children, ...props }) => (
</span>
)}
{!isNotNullOrUndefined(props.humidity) && (
<span class="stamp stamp-md bg-red-dark mr-3">
<span class="stamp stamp-md bg-warning mr-3">
<i class="fe fe-droplet" />
</span>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from 'preact';
import { connect } from 'unistore/preact';
import { Localizer, Text } from 'preact-i18n';
import { Text } from 'preact-i18n';
import BaseEditBox from '../baseEditBox';
import ReactSlider from 'react-slider';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import get from 'get-value';

import actions from '../../../actions/dashboard/boxes/temperatureInRoom';
import { DASHBOARD_BOX_STATUS_KEY, DASHBOARD_BOX_DATA_KEY } from '../../../utils/consts';
import {
DEFAULT_VALUE_HUMIDITY,
DEFAULT_VALUE_TEMPERATURE,
WEBSOCKET_MESSAGE_TYPES
} from '../../../../../server/utils/constants';
import { DEFAULT_VALUE_TEMPERATURE, WEBSOCKET_MESSAGE_TYPES } from '../../../../../server/utils/constants';

const isNotNullOrUndefined = value => value !== undefined && value !== null;

Expand All @@ -34,7 +30,7 @@ const RoomTemperatureBox = ({ children, ...props }) => (
</span>
)}
{!isNotNullOrUndefined(props.temperature) && (
<span class="stamp stamp-md bg-red-dark mr-3">
<span class="stamp stamp-md bg-warning mr-3">
<i class="fe fe-thermometer" />
</span>
)}
Expand Down

0 comments on commit 84dcf6a

Please sign in to comment.