Refactor adventure page layout to display activity types in +page.svelte and update server files

This commit is contained in:
Sean Morley
2024-04-30 22:52:07 +00:00
parent 296659ea27
commit 9f9f0c3d87
2 changed files with 24 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
onMount(() => {
if (data.adventure.adventure) {
adventure = data.adventure.adventure[0];
console.log(adventure.activityTypes);
} else {
goto("/404");
}
@@ -63,4 +64,12 @@
/>
</div>
{/if}
{#if adventure.activityTypes && adventure.activityTypes.length > 0}
<div class="flex justify-center items-center mt-4">
<p class="text-center text-lg">Activities:</p>
<ul class="flex flex-wrap">
{adventure.activityTypes.toString()}
</ul>
</div>
{/if}
{/if}