fix created at display

This commit is contained in:
Alexander Bocken 2023-11-20 23:32:14 +01:00
parent aa4a4c4cd5
commit 1f5e252b2b
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -58,7 +58,7 @@
placeholder_src = "https://bocken.org/static/rezepte/placeholder/" + data.short_name + ".webp" placeholder_src = "https://bocken.org/static/rezepte/placeholder/" + data.short_name + ".webp"
season_iv = season_intervals(); season_iv = season_intervals();
}) })
let display_date = new Date(data.createdAt); let display_date = new Date(data.dateCreated);
if (data.updatedAt){ if (data.updatedAt){
display_date = new Date(data.updatedAt); display_date = new Date(data.updatedAt);
} }
@ -290,11 +290,7 @@ h4{
{@html data.addendum} {@html data.addendum}
{/if} {/if}
</div> </div>
{#if data.updatedAt} <p class=date>Letzte Änderung: {formatted_display_date}</p>
<p class=date>Letzte Änderung: {formatted_display_date}</p>
{:else}
<p class=date>Erstellt am: {formatted_display_date}</p>
{/if}
</div> </div>
</TitleImgParallax> </TitleImgParallax>