Skip to content

Commit 6803e30

Browse files
weather data set data to null on error from response
1 parent a7f32a1 commit 6803e30

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/pages/dashboard/services/WeatherData/WeatherData.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ const WeatherDataPage = () => {
8383
useEffect(() => {
8484
if (error) {
8585
showSnackbar('error', 'Error loading weather');
86+
setFormattedData(null);
8687
}
8788
}, [error])
8889

0 commit comments

Comments
 (0)