From 58d0469918a9d75290d63118b497bfc6f4b67d66 Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Sat, 27 Aug 2022 14:39:25 +0100 Subject: [PATCH] fix: icon bug & small cleanup --- src/components/widgets/weather/Weather.jsx | 37 ++++++--------------- src/components/widgets/weather/weather.scss | 2 +- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/src/components/widgets/weather/Weather.jsx b/src/components/widgets/weather/Weather.jsx index d2bbfdf2..74cf166c 100644 --- a/src/components/widgets/weather/Weather.jsx +++ b/src/components/widgets/weather/Weather.jsx @@ -157,31 +157,6 @@ export default class Weather extends PureComponent { ); } - const minmax = () => { - { - /*const mintemp = enabled('mintemp'); - const maxtemp = enabled('maxtemp'); - - if (!mintemp && !maxtemp) { - return null; - } else if (mintemp && !maxtemp) { - return ( - {this.state.weather.temp_min + this.state.temp_text} - ); - } else if (maxtemp && !mintemp) { - return ( - {this.state.weather.temp_max + this.state.temp_text} - ); - } else {*/ - } - return ( - <> - {this.state.weather.temp_min + this.state.temp_text}{' '} - {this.state.weather.temp_max + this.state.temp_text} - - ); - }; - const expandedInfo = () => { return (
@@ -283,11 +258,19 @@ export default class Weather extends PureComponent { {this.state.weather.temp + this.state.temp_text}
)} - {localStorage.getItem('weatherType') >= 2 && {minmax()}} + {localStorage.getItem('weatherType') >= 2 && ( + + + {this.state.weather.temp_min + this.state.temp_text} + + + {this.state.weather.temp_max + this.state.temp_text} + + + )} {localStorage.getItem('weatherType') >= 2 && (
- {/*{enabled('humidity') ? {this.state.weather.humidity}% : null}*/} {variables.getMessage('widgets.weather.feels_like', { amount: this.state.weather.temp_feels_like + this.state.temp_text, diff --git a/src/components/widgets/weather/weather.scss b/src/components/widgets/weather/weather.scss index 5a5f8bb1..2bf65b5c 100644 --- a/src/components/widgets/weather/weather.scss +++ b/src/components/widgets/weather/weather.scss @@ -99,7 +99,7 @@ } .weatherIcon { - font-size: 1.4em; + font-size: 1.4em !important; display: grid; align-items: center; }