Skip to content

Commit

Permalink
'latest known data' link now preserves context
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotsko committed Feb 26, 2024
1 parent 3e88df5 commit 866ecda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/blocks/IndicatorWarning.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
<div data-uk-alert class="uk-alert-warning">
The indicator "{sensor.name}" is not available for {formatDateYearDayOfWeekAbbr(date.value)}, yet. The latest
known data is available on
<a href="?date={formatAPITime(sensor.timeFrame.max)}" on:click={switchDate}
>{formatDateYearDayOfWeekAbbr(sensor.timeFrame.max)}</a
<a
href="?date={formatAPITime(sensor.timeFrame.max)}&{window.location.search.split('&').slice(1).join('&')}"
on:click={switchDate}>{formatDateYearDayOfWeekAbbr(sensor.timeFrame.max)}</a
>.
</div>
{/if}
Expand Down

0 comments on commit 866ecda

Please sign in to comment.