1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-29 17:59:36 +02:00

refactor: Update +page.svelte to improve rendering performance and fix conditional rendering issue

This commit is contained in:
Sean Morley 2024-07-28 12:45:00 -04:00
parent 54ef1677e8
commit 589eb094d5

View file

@ -425,7 +425,8 @@
on:typeChange={changeType}
/>
{/each}
{:else if dayTransportations.length > 0}
{/if}
{#if dayTransportations.length > 0}
{#each dayTransportations as transportation}
<TransportationCard
{transportation}
@ -438,17 +439,18 @@
}}
/>
{/each}
{:else}
{/if}
{#if dayAdventures.length == 0 && dayTransportations.length == 0}
<p class="text-center text-lg mt-2">
No adventures or transportaions planned for this day.
</p>
{/if}
</div>
{/each}
<div class="flex items-center justify-center w-10/12">
<MapLibre
style="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
class="relative aspect-[9/16] max-h-[70vh] w-full sm:aspect-video sm:max-h-full"
class="flex items-center self-center justify-center aspect-[9/16] max-h-[70vh] sm:aspect-video sm:max-h-full w-10/12"
standardControls
>
<!-- MapEvents gives you access to map events even from other components inside the map,
@ -474,6 +476,5 @@
{/if}
{/each}
</MapLibre>
</div>
{/if}
{/if}