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(() => {
if (weather && basicWeather) {
setCurrent({
icon: weather.features[0].properties.icon.replace('medium', 'large'),
icon: weather.features[0].properties.icon?.replace('medium', 'large') || '',
temperature: Math.round(
(weather.features[0].properties.temperature.value * 9) / 5 + 32,
),

View File

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