1.7.2
Cache API calls
This commit is contained in:
+3
-1
@@ -43,7 +43,7 @@ export function UTCIForecast() {
|
||||
// useAppState. See hooks/useAppState.js for the full reading order.
|
||||
const {
|
||||
location, setLocationAndSave,
|
||||
forecast, airQuality, loading, error, now,
|
||||
forecast, airQuality, loading, error, now, fetchedAt,
|
||||
searchQuery, setSearchQuery, searchResults, searching,
|
||||
selectedDay, setSelectedDay,
|
||||
proPromptDay, setProPromptDay,
|
||||
@@ -198,6 +198,8 @@ export function UTCIForecast() {
|
||||
${location.lat.toFixed(3)}°, ${location.lon.toFixed(3)}°
|
||||
</span>
|
||||
</div>
|
||||
${fetchedAt && !loading && html`
|
||||
<div class="utci-fetch-time">Last update: ${fetchedAt.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}</div>`}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user