Skip to content

Commit

Permalink
show event link (#685)
Browse files Browse the repository at this point in the history
* show event link

* edit EventEditor.svelte
  • Loading branch information
anahitachavan authored Jan 29, 2025
1 parent 2e06fe3 commit 8f77723
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/routes/(app)/events/Event.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| "imageUrl"
| "isCancelled"
| "location"
| "link"
> &
Partial<Pick<Event, "removedAt">>;
</script>
Expand Down Expand Up @@ -56,6 +57,21 @@
</div>
</section>
{/if}
{#if event.link}
<section class="my-2">
<div class="flex items-center gap-2 text-primary">
<span class="i-mdi-link text-lg"></span>
<a
href={event.link}
class="text-base leading-none hover:underline"
target="_blank"
rel="noopener noreferrer"
>
{m.events_link()}
</a>
</div>
</section>
{/if}

<slot name="buttons" />

Expand Down
1 change: 1 addition & 0 deletions src/routes/(app)/events/EventEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@
? URL.createObjectURL($form.image)
: ($form.imageUrl ?? null),
location: $form.location, // Pass location to Event component
link: $form.link,
}}
>
<div slot="tags" class="flex flex-row flex-wrap gap-2">
Expand Down
15 changes: 15 additions & 0 deletions src/routes/(app)/events/SmallEventCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@
</div>
</section>
{/if}
{#if event.link}
<section class="my-2">
<div class="flex items-center gap-2">
<span class="i-mdi-link text-lg"></span>
<a
href={event.link}
class="text-base leading-none hover:underline"
target="_blank"
rel="noopener noreferrer"
>
{m.events_link()}
</a>
</div>
</section>
{/if}
</section>

<InterestedGoingButtons
Expand Down

0 comments on commit 8f77723

Please sign in to comment.