feat: date format on weather widget (#1443)

* feat: date format on weather widget

* fix: type check error

* fix: reviewed changes

* fix: reviewed changes
This commit is contained in:
Yossi Hillali
2024-11-08 11:33:03 +02:00
committed by GitHub
parent aa503992af
commit c51c5db3d7
6 changed files with 45 additions and 2 deletions

View File

@@ -115,6 +115,7 @@ const WeeklyForecast = ({ options, weather }: WeatherProps) => {
};
function Forecast({ weather, options }: WeatherProps) {
const dateFormat = options.dateFormat;
return (
<Group className="weather-forecast-days-group" w="100%" justify="space-evenly" wrap="nowrap" pb="2.5cqmin">
{weather.daily.slice(0, options.forecastDayCount).map((dayWeather, index) => (
@@ -136,6 +137,7 @@ function Forecast({ weather, options }: WeatherProps) {
</HoverCard.Target>
<HoverCard.Dropdown>
<WeatherDescription
dateFormat={dateFormat}
time={dayWeather.time}
weatherCode={dayWeather.weatherCode}
maxTemp={getPreferredUnit(dayWeather.maxTemp, options.isFormatFahrenheit)}