diff --git a/frontend/src/routes/adventures/[id]/+page.svelte b/frontend/src/routes/adventures/[id]/+page.svelte index 0640383..1e6b0f5 100644 --- a/frontend/src/routes/adventures/[id]/+page.svelte +++ b/frontend/src/routes/adventures/[id]/+page.svelte @@ -27,6 +27,10 @@ let adventure: Adventure; let notFound: boolean = false; + let isEditModalOpen: boolean = false; + + import ClipboardList from '~icons/mdi/clipboard-list'; + import EditAdventure from '$lib/components/EditAdventure.svelte'; onMount(() => { if (data.props.adventure) { @@ -35,6 +39,11 @@ notFound = true; } }); + + function saveEdit(event: CustomEvent) { + adventure = event.detail; + isEditModalOpen = false; + } {#if notFound} @@ -59,6 +68,14 @@ {/if} +{#if isEditModalOpen} + (isEditModalOpen = false)} + on:saveEdit={saveEdit} + /> +{/if} + {#if !adventure && !notFound}
@@ -66,6 +83,11 @@ {/if} {#if adventure} +
+ +