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