Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description
At the moment, cities are not refreshed at all anymore if a city has been selected.
In Landing, we call the refresh manually as a workaround.
However, if a city is selected, Landing is not rendered anymore and therefore the workaround is not triggered.
This PR works around that by using
useLoadWithCache
instead ofuseLoadCities
in theuseCityContent
hook.Proposed changes
Use
useLoadWithCache
overuseLoadCities
in theuseCityContent
hook.Side effects
None.
Testing
Instead of manually changing values in the CMS and waiting for the next day for the refresh to happen, you can also do the following:
mapCityJson
, e.g. the following line tointegreat-app/shared/api/mapping/mapCityJson.ts
Line 29 in 4529e21
eventsEnabled: true
useLoadWithCache
, i.e. the following line tointegreat-app/native/src/hooks/useLoadWithCache.ts
Line 41 in 4529e21
Resolved issues
Fixes: #2897.