Make timestamp optional in Comment component

We’ll need this for draft comments
This commit is contained in:
Thomas Scholtes
2025-06-27 16:30:13 +02:00
committed by Sebastian Martinez
parent 430a5b931c
commit e5f2071aea
+6 -4
View File
@@ -28,7 +28,7 @@
reactions?: Reaction[];
embeds?: Map<string, Embed>;
caption?: string;
timestamp: number;
timestamp?: number;
lastEdit?: Edit;
disallowEmptyBody?: boolean;
emptyBodyTooltip?: string;
@@ -139,9 +139,11 @@
{#if beforeTimestamp}
{@render beforeTimestamp()}
{/if}
<span class="timestamp" title={utils.absoluteTimestamp(timestamp)}>
{utils.formatTimestamp(timestamp)}
</span>
{#if timestamp}
<span class="timestamp" title={utils.absoluteTimestamp(timestamp)}>
{utils.formatTimestamp(timestamp)}
</span>
{/if}
{#if lastEdit}
<div
class="card-metadata"