From 713877772e57415e518ee9a8dc1655f0e4ee84b1 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 4 Feb 2024 11:26:54 -0800 Subject: [PATCH] fix: documents tags --- src/routes/(app)/documents/+page.svelte | 50 +++++++++++++------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/routes/(app)/documents/+page.svelte b/src/routes/(app)/documents/+page.svelte index fc117d5b..5152385a 100644 --- a/src/routes/(app)/documents/+page.svelte +++ b/src/routes/(app)/documents/+page.svelte @@ -247,38 +247,38 @@ --> - {#each $documents.filter((doc) => (selectedTag === '' || (doc?.content?.tags ?? []) - .map((tag) => tag.name) - .includes(selectedTag)) && (query === '' || doc.name.includes(query))) as doc} -
+
- {#if tags.length > 0} -
+ {#if tags.length > 0} +
+ + {#each tags as tag} - {#each tags as tag} - - {/each} -
- {/if} + {/each} +
+ {/if} + {#each $documents.filter((doc) => (selectedTag === '' || (doc?.content?.tags ?? []) + .map((tag) => tag.name) + .includes(selectedTag)) && (query === '' || doc.name.includes(query))) as doc}
@@ -419,7 +419,9 @@
{/each} -
+ {#if $documents.length > 0} +
+ {/if}