diff --git a/src/components/WeatherModal/CurrentWeather.tsx b/src/components/WeatherModal/CurrentWeather.tsx
index 08656c6..39dd7f9 100644
--- a/src/components/WeatherModal/CurrentWeather.tsx
+++ b/src/components/WeatherModal/CurrentWeather.tsx
@@ -1,7 +1,7 @@
import { Box, Card, Group, Stack, Text } from '@mantine/core';
import { useCommonHooks } from 'hooks';
-import { FaLongArrowAltDown, FaLongArrowAltUp, FaWind } from 'react-icons/fa';
-import { WiBarometer, WiHumidity, WiSunrise, WiSunset } from 'react-icons/wi';
+import { FaCloud, FaLocationArrow, FaSun, FaWind } from 'react-icons/fa';
+import { WiBarometer, WiHumidity, WiRain, WiSunrise, WiSunset } from 'react-icons/wi';
import { textClasses } from 'styles';
import type { MeteoWeather } from 'types';
import WeatherFeaturePill from './WeatherFeaturePill';
@@ -54,11 +54,9 @@ export default function CurrentWeather({
}: {
current: MeteoWeather | undefined;
}) {
- const { isMobile, theme, textShadowStyle } = useCommonHooks();
-
+ const { isMobile, theme } = useCommonHooks();
const sunrise = new Date(current?.daily.sunrise[0] || 0).toLocaleTimeString();
const sunset = new Date(current?.daily.sunset[0] || 0).toLocaleTimeString();
-
return (
<>
{current && (
@@ -84,8 +82,115 @@ export default function CurrentWeather({
>
Current Weather
-
-
+
+
+
+
+
+
+ Precipitation
+
+ }
+ rightSide={{current.current.precipitation} in.}
+ highlight='right'
+ />
+
+
+ Humidity
+
+ }
+ rightSide={{current.current.relative_humidity_2m}%}
+ highlight='right'
+ />
+
+
+ Pressure
+
+ }
+ rightSide={
+ {current.current.surface_pressure?.toFixed(0)} mbar
+ }
+ highlight='right'
+ />
+
+
+
+
+
+ {current.current.cloud_cover?.toFixed(0)}%
+
+
+
+
+
+
+ Wind
+
+ }
+ rightSide={
+ {current.current.wind_speed_10m?.toFixed(0)}mph
+ }
+ highlight='right'
+ />
+
+
+ Gusts
+
+ }
+ rightSide={
+ {current.current.wind_gusts_10m?.toFixed(0)}mph
+ }
+ highlight='right'
+ />
+
+
+
+
+
+ {current.current.wind_direction_10m?.toFixed(0)}°
+
+
+
+
-
-
+ Feels like }
+ rightSide={
+
+ {current.current.apparent_temperature?.toFixed(0) ??
+ current.current.temperature_2m?.toFixed(0)}
+ °F
+
+ }
+ highlight='right'
+ />
+
+
+
-
-
-
- {current.current.temperature_2m?.toFixed(0)}°
- F
+ {current.current.temperature_2m?.toFixed(0)}
+ °F
+
+
+ {current.daily.temperature_2m_max?.[0].toFixed(0)}°F/
+ {current.daily.temperature_2m_min?.[0].toFixed(0)}°F
+
+
25
@@ -151,6 +272,7 @@ export default function CurrentWeather({
: undefined
}
classNames={textClasses}
+ style={{ lineHeight: 1 }}
>
{current.current.temperature_2m?.toFixed(0) === '69'
? 'Nice'
@@ -158,124 +280,54 @@ export default function CurrentWeather({
- Feels like }
- rightSide={
-
- {current.current.apparent_temperature?.toFixed(0) ??
- current.current.temperature_2m?.toFixed(0)}
- °F
-
- }
- highlight='right'
- />
-
-
-
- Temperatures
-
-
-
-
- High
-
- }
- rightSide={
-
- {current.daily.temperature_2m_max?.[0].toFixed(0)}°F
-
- }
- highlight='right'
- />
-
-
- Low
-
- }
- rightSide={
-
- {current.daily.temperature_2m_min?.[0].toFixed(0)}°F
-
- }
- highlight='right'
- />
-
-
-
-
- Conditions
-
-
-
-
- Humidity
-
- }
- rightSide={{current.current.relative_humidity_2m}%}
- highlight='right'
- />
-
-
- Wind
-
- }
- rightSide={
- {current.current.wind_speed_10m?.toFixed(0)}mph
- }
- highlight='right'
- />
-
-
- Pressure
-
- }
- rightSide={
- {current.current.surface_pressure?.toFixed(0)} mbar
- }
- highlight='right'
- />
-
-
-
-
- Sun Cycle
-
-
+
+
+
+
+
+
+
+
+
+ UV {current.daily.uv_index_max?.[0].toFixed(0)}
+
+
@@ -310,8 +362,8 @@ export default function CurrentWeather({
rightSide={{sunset}}
highlight='left'
/>
-
-
+
+
diff --git a/src/components/WeatherModal/WeatherFeaturePill.tsx b/src/components/WeatherModal/WeatherFeaturePill.tsx
index bb08d53..1b19fef 100644
--- a/src/components/WeatherModal/WeatherFeaturePill.tsx
+++ b/src/components/WeatherModal/WeatherFeaturePill.tsx
@@ -11,11 +11,12 @@ function WeatherFeaturePill({
}) {
return (
{
+ switch (size) {
+ case 'xs':
+ return { width: 16, height: 16 };
+ case 'sm':
+ return { width: '32px', height: '32px' };
+ case 'md':
+ return { width: '75px', height: '75px' };
+ case 'lg':
+ return { width: '150px', height: '150px' };
+ case 'xl':
+ return { width: '225px', height: '225px' };
+ default:
+ return { width: 32, height: 32 };
+ }
+ };
const lookupSource = (code: any) => {
switch (code) {
case 0:
@@ -180,11 +196,7 @@ export default function WeatherIcon({
return (