Weather icon hotfix

This commit is contained in:
Sean Edmunds
2024-12-04 12:24:58 -06:00
parent 67686cef7c
commit 85e9c9134a
2 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ function Header({ greet, date, isMobile }: any) {
useEffect(() => { useEffect(() => {
if (weather && basicWeather) { if (weather && basicWeather) {
setCurrent({ setCurrent({
icon: weather.features[0].properties.icon.replace('medium', 'large'), icon: weather.features[0].properties.icon?.replace('medium', 'large') || '',
temperature: Math.round( temperature: Math.round(
(weather.features[0].properties.temperature.value * 9) / 5 + 32, (weather.features[0].properties.temperature.value * 9) / 5 + 32,
), ),

View File

@@ -93,8 +93,9 @@ export default function Search() {
useEffect(() => { useEffect(() => {
if (weather && basicWeather) { if (weather && basicWeather) {
console.log(weather.features[0])
setCurrent({ setCurrent({
icon: weather.features[0].properties.icon.replace('medium', 'large'), icon: weather.features[0].properties.icon?.replace('medium', 'large') || '',
temperature: Math.round( temperature: Math.round(
(weather.features[0].properties.temperature.value * 9) / 5 + 32, (weather.features[0].properties.temperature.value * 9) / 5 + 32,
), ),
@@ -140,7 +141,6 @@ export default function Search() {
]); ]);
} }
}, [forecast]) }, [forecast])
console.log(outlook)
return ( return (
<Stack <Stack
style={{ style={{