From c35795144e3f2928cdc6a2ea167a0ecd79137ff6 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Sat, 17 Aug 2024 17:34:52 -0400 Subject: [PATCH] chore: Refactor CollectionCard component and improve dropdown menu styling --- .../src/lib/components/CollectionCard.svelte | 87 ++++++++++--------- .../src/lib/components/EditAdventure.svelte | 11 +++ .../src/routes/adventures/[id]/+page.svelte | 21 ----- 3 files changed, 55 insertions(+), 64 deletions(-) diff --git a/frontend/src/lib/components/CollectionCard.svelte b/frontend/src/lib/components/CollectionCard.svelte index df07f46..0270eb7 100644 --- a/frontend/src/lib/components/CollectionCard.svelte +++ b/frontend/src/lib/components/CollectionCard.svelte @@ -112,50 +112,51 @@

{/if}
-
diff --git a/frontend/src/lib/components/EditAdventure.svelte b/frontend/src/lib/components/EditAdventure.svelte index 23e3872..985ef5b 100644 --- a/frontend/src/lib/components/EditAdventure.svelte +++ b/frontend/src/lib/components/EditAdventure.svelte @@ -32,6 +32,17 @@ images = adventureToEdit.images || []; + if (adventureToEdit.longitude && adventureToEdit.latitude) { + markers = [ + { + lngLat: { lng: adventureToEdit.longitude, lat: adventureToEdit.latitude }, + location: adventureToEdit.location || '', + name: adventureToEdit.name, + activity_type: '' + } + ]; + } + if (longitude && latitude) { adventureToEdit.latitude = latitude; adventureToEdit.longitude = longitude; diff --git a/frontend/src/routes/adventures/[id]/+page.svelte b/frontend/src/routes/adventures/[id]/+page.svelte index 6b9ff2a..bbb0afb 100644 --- a/frontend/src/routes/adventures/[id]/+page.svelte +++ b/frontend/src/routes/adventures/[id]/+page.svelte @@ -98,18 +98,6 @@
- {#if adventure.images && adventure.images.length > 0} {/each}
- {:else} - - No image available {/if} -

{adventure.name}

-
{#if adventure.rating !== undefined && adventure.rating !== null}