From 048ff0faa23c3819c876e46b6bdbd0ee99c9202b Mon Sep 17 00:00:00 2001 From: Skkay Date: Sun, 20 Aug 2023 20:04:15 +0200 Subject: [PATCH] Capitalize first letter of openweather description --- src/components/widgets/openweathermap/weather.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/widgets/openweathermap/weather.jsx b/src/components/widgets/openweathermap/weather.jsx index 32c81f06..c57e6010 100644 --- a/src/components/widgets/openweathermap/weather.jsx +++ b/src/components/widgets/openweathermap/weather.jsx @@ -32,13 +32,14 @@ function Widget({ options }) { } const unit = options.units === "metric" ? "celsius" : "fahrenheit"; + const description = data.weather[0].description.charAt(0).toUpperCase() + data.weather[0].description.slice(1); const condition = data.weather[0].id; const timeOfDay = data.dt > data.sys.sunrise && data.dt < data.sys.sunset ? "day" : "night"; return {options.label && `${options.label}, ` }{t("common.number", { value: data.main.temp, style: "unit", unit })} - {data.weather[0].description} + {description} ; }