From 2544de46eed6fd9493eff6e2d41a8aa5d169bf51 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Mon, 4 Nov 2024 01:10:05 -0500
Subject: Retire use of <slot />

---
 ui/routes/+layout.svelte | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'ui/routes/+layout.svelte')

diff --git a/ui/routes/+layout.svelte b/ui/routes/+layout.svelte
index 0477195..d786389 100644
--- a/ui/routes/+layout.svelte
+++ b/ui/routes/+layout.svelte
@@ -8,20 +8,23 @@
 
   import CurrentUser from '$lib/components/CurrentUser.svelte';
 
-  function toggleMenu() {
+  function toggleMenu(event) {
+    event.preventDefault();
     showMenu.update((value) => !value);
   }
 
   onNavigate(() => {
     showMenu.update(() => false);
   });
+
+  let { children } = $props();
 </script>
 
 <div id="app" class="m-0 p-0 h-vh w-full">
   <div class="w-full">
     <AppBar class="app-bar">
       <svelte:fragment slot="lead">
-        <button on:click|preventDefault={toggleMenu} class="cursor-pointer">
+        <button onclick={toggleMenu} class="cursor-pointer">
           <img class="w-8 h-8" alt="logo" src={logo} />
         </button>
       </svelte:fragment>
@@ -34,7 +37,7 @@
     </AppBar>
   </div>
 
-  <slot />
+  {@render children?.()}
 </div>
 
 <style>
-- 
cgit v1.2.3

