Weather icon hotfix
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
@@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user