Skip to content

Commit

Permalink
fix: use 'slug' property instead of tag's 'name' to create the URL
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com>
  • Loading branch information
goniszewski committed Apr 30, 2024
1 parent 7a01adb commit c5d6416
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/BookmarkCard/BookmarkCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
<span class="font-sans text-xs font-semibold">#</span>
{#if bookmark.tags}
{#each bookmark.tags as tag (tag.id)}
<a href={`/tags/${tag.name}`} class="link font-sans text-xs">{tag.name}</a>
<a href={`/tags/${tag.slug}`} class="link font-sans text-xs">{tag.name}</a>
{/each}
{/if}
<button title="Add new tag" class="link-hover link font-sans text-xs text-gray-400"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
{#if bookmark.tags}
{#each bookmark.tags as tag (tag.id)}
<a
href={`/tags/${tag.name}`}
href={`/tags/${tag.slug}`}
class="link w-full max-w-[8rem] whitespace-nowrap font-sans text-xs hover:text-secondary"
>{tag.name}</a
>
Expand Down

0 comments on commit c5d6416

Please sign in to comment.