Fix weather disable not working (#576)

This commit is contained in:
davfsa
2024-12-21 20:37:10 +01:00
committed by GitHub
parent 49c21c069d
commit 280413c2e4

View File

@@ -4,7 +4,11 @@ import { TodayTemperature } from './temperature/index.js';
import { HourlyTemperature } from './hourly/index.js'; import { HourlyTemperature } from './hourly/index.js';
import Separator from 'src/components/shared/Separator.js'; import Separator from 'src/components/shared/Separator.js';
export const WeatherWidget = (): JSX.Element => { export const WeatherWidget = ({ isEnabled }: WeatherWidgetProps): JSX.Element => {
if (!isEnabled) {
return <box />;
}
return ( return (
<box className={'calendar-menu-item-container weather'}> <box className={'calendar-menu-item-container weather'}>
<box className={'weather-container-box'}> <box className={'weather-container-box'}>
@@ -21,3 +25,7 @@ export const WeatherWidget = (): JSX.Element => {
</box> </box>
); );
}; };
interface WeatherWidgetProps {
isEnabled: boolean;
}