Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Make timestamp optional in Comment component
Thomas Scholtes committed 10 months ago
commit e5f2071aeab8073ee92066b38e2e4ea9b663dd13
parent 430a5b9
1 file changed +6 -4
modified src/components/Comment.svelte
@@ -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"