From dbe2f01b8d1630b2e887055503e837e0f3128e92 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Sat, 27 Jul 2024 14:40:33 -0400 Subject: [PATCH] refactor: Update adventure and collection page headers and date formatting --- frontend/src/routes/collections/[id]/+page.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/routes/collections/[id]/+page.svelte b/frontend/src/routes/collections/[id]/+page.svelte index e3813a7..0efe833 100644 --- a/frontend/src/routes/collections/[id]/+page.svelte +++ b/frontend/src/routes/collections/[id]/+page.svelte @@ -220,7 +220,7 @@ {/if} -

Linked Adventures

+

Linked Adventures

{#if adventures.length == 0} {/if} @@ -237,15 +237,17 @@ {/each} - {#if numberOfDays} -

Duration: {numberOfDays} days

- {/if} {#if collection.start_date && collection.end_date} +

Itinerary

+ {#if numberOfDays} +

Duration: {numberOfDays} days

+ {/if}

Dates: {new Date(collection.start_date).toLocaleDateString('en-US', { timeZone: 'UTC' })} - {new Date( collection.end_date ).toLocaleDateString('en-US', { timeZone: 'UTC' })}

+
{#each Array(numberOfDays) as _, i} {@const currentDate = new Date(collection.start_date)}