diff --git a/src/components/Header.astro b/src/components/Header.astro index 28dd602..89595c5 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -7,8 +7,9 @@
\ No newline at end of file diff --git a/src/data/pocketbase.ts b/src/data/pocketbase.ts index c3f6c9a..8684c0a 100644 --- a/src/data/pocketbase.ts +++ b/src/data/pocketbase.ts @@ -44,6 +44,10 @@ class APIClient { return urls } + async getAllTags() { + return await this.client.collection
- {recipes.length} { recipes.length == 1 ? "Recipe" : "Recipes" } with: {name}
+ {recipes.length} { recipes.length == 1 ? "Recipe" : "Recipes" } with: {name}
+ {tags.length} Tags +
+ { + (tags ?? []).map((t, i) => ( + //{t.name} -> {countsPerTag[i]} {countsPerTag[i] == 1 ? "Recipe" : "Recipes" }
+ + {t.name} ({countsPerTag[i]}) +