1.7.2
Cache API calls
This commit is contained in:
@@ -51,7 +51,7 @@ export function useAppState() {
|
||||
setLocation(loc);
|
||||
};
|
||||
|
||||
const { forecast, airQuality, loading, error, now } = useForecast(location);
|
||||
const { forecast, airQuality, loading, error, now, fetchedAt } = useForecast(location);
|
||||
|
||||
const [searchQuery, setSearchQuery] = useState('');
|
||||
const [searchResults, setSearchResults] = useState([]);
|
||||
@@ -387,7 +387,7 @@ export function useAppState() {
|
||||
// location
|
||||
location, setLocationAndSave,
|
||||
// forecast
|
||||
forecast, airQuality, loading, error, now,
|
||||
forecast, airQuality, loading, error, now, fetchedAt,
|
||||
// search
|
||||
searchQuery, setSearchQuery,
|
||||
searchResults, setSearchResults,
|
||||
|
||||
Reference in New Issue
Block a user