Skip to content

Commit

Permalink
Merge pull request #98 from goniszewski/95-incorrect-tag-links
Browse files Browse the repository at this point in the history
fix: use 'slug' property instead of tag's 'name' to create the URL
  • Loading branch information
goniszewski committed Apr 30, 2024
2 parents 7a01adb + c5d6416 commit 3a53057
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 3a53057

Please sign in to comment.