Skip to content

Commit

Permalink
Hide link adventure when the user is not the owner
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmorley15 committed Sep 11, 2024
1 parent 4a29379 commit 5df1c4c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions frontend/src/routes/collections/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,17 @@
tabindex="0"
class="dropdown-content z-[1] menu p-4 shadow bg-base-300 text-base-content rounded-box w-52 gap-4"
>
<p class="text-center font-bold text-lg">Link new...</p>
<button
class="btn btn-primary"
on:click={() => {
isShowingLinkModal = true;
}}
>
Adventure</button
>
{#if collection.user_id === data.user.pk}
<p class="text-center font-bold text-lg">Link new...</p>
<button
class="btn btn-primary"
on:click={() => {
isShowingLinkModal = true;
}}
>
Adventure</button
>
{/if}
<p class="text-center font-bold text-lg">Add new...</p>
<button
class="btn btn-primary"
Expand Down

0 comments on commit 5df1c4c

Please sign in to comment.