1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-23 13:29:35 +02:00

Fixed bug with overwriting opened tabs. Added proxy for websocket

This commit is contained in:
unknown 2021-06-10 13:05:55 +02:00
parent 936da301b8
commit 78de8752c6
9 changed files with 60 additions and 114 deletions

View file

@ -12,8 +12,8 @@ interface ComponentProps {
const WeatherIcon = (props: ComponentProps): JSX.Element => {
const icon = props.isDay
? (new IconMapping).mapIcon(props.weatherStatusCode, TimeOfDay.day)
: (new IconMapping).mapIcon(props.weatherStatusCode, TimeOfDay.night);
? new IconMapping().mapIcon(props.weatherStatusCode, TimeOfDay.day)
: new IconMapping().mapIcon(props.weatherStatusCode, TimeOfDay.night);
useEffect(() => {
const delay = setTimeout(() => {
@ -25,7 +25,7 @@ const WeatherIcon = (props: ComponentProps): JSX.Element => {
return () => {
clearTimeout(delay);
}
}, [props.weatherStatusCode]);
}, [props.weatherStatusCode, icon, props.theme.colors.accent]);
return <canvas id={`weather-icon`} width='50' height='50'></canvas>
}