add addrainfall on home

This commit is contained in:
Romulus21
2024-04-22 22:23:59 +02:00
parent 2f260555cb
commit 2f2077497d
4 changed files with 35 additions and 26 deletions

View File

@@ -68,9 +68,9 @@ const Weather = () => {
{errorLabel()}
<Card className="flex justify-between">
<Card className={`flex justify-between ${loading ? 'animate-pulse' : ''}`}>
<div className="m-2 flex flex-col justify-between">
<span className="text-6xl">{currentWeather?.main.temp.toFixed()} °C</span>
<span className="text-6xl">{currentWeather?.main.temp.toFixed() ?? '--'} °C</span>
<span className="text-secondary dark:text-secondary-ligth">{currentWeather?.weather[0].description}</span>
</div>
<div className="flex items-stretch">
@@ -81,8 +81,8 @@ const Weather = () => {
alt={currentWeather?.weather[0].main} width="120px" />}
</div>
<div className="flex flex-col gap-1">
<span className="pt-5 text-4xl">{currentWeather?.main.temp_max.toFixed()} <span className="text-2xl">°C</span></span>
<span className="mt-2 text-2xl text-secondary dark:text-secondary-ligth">{currentWeather?.main.temp_min.toFixed()} °C</span>
<span className="pt-5 text-4xl">{currentWeather?.main.temp_max.toFixed() ?? '--'} <span className="text-2xl">°C</span></span>
<span className="mt-2 text-2xl text-secondary dark:text-secondary-ligth">{currentWeather?.main.temp_min.toFixed() ?? '--'} °C</span>
</div>
</div>
</Card>