fix: correct assignment of table_date variable

Simplified the assignment of the 'table_date' variable to ensure clearer readability and consistency across the price performance shortcodes. This change helps avoid potential reassignments within the same scope, ensuring the correct date is consistently used for display.
This commit is contained in:
Kumi 2024-07-23 10:37:12 +02:00
parent b86ff14829
commit f6db3448bd
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -16,7 +16,7 @@
<tr>
{{ $price := split (.Get "price_usd") "," }}
<td data-th="XMR to">USD</td>
<td data-th='{{ $td := .Get "table_date" }}'>${{ index $price 0 }}</td>
<td data-th='{{ $td }}'>${{ index $price 0 }}</td>
{{ $week := index $price 1 }}
{{ $month := index $price 2 }}
@ -36,7 +36,7 @@
<tr class="row3">
{{ $price := split (.Get "price_eur") "," }}
<td data-th="XMR to">EUR</td>
<td data-th='{{ $td := .Get "table_date" }}'>€{{ index $price 0 }}</td>
<td data-th='{{ $td }}'>€{{ index $price 0 }}</td>
{{ $week := index $price 1 }}
{{ $month := index $price 2 }}
@ -56,7 +56,7 @@
<tr>
{{ $price := split (.Get "price_btc") "," }}
<td data-th="XMR to">BTC</td>
<td data-th='{{ $td := .Get "table_date" }}'>₿{{ index $price 0 }}</td>
<td data-th='{{ $td }}'>₿{{ index $price 0 }}</td>
{{ $week := index $price 1 }}
{{ $month := index $price 2 }}