From 30fa0c4c1faece6b054105fe3cce5107f24a2fa2 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Sun, 3 Nov 2024 15:33:43 -0500
Subject: Svelte 5: go through and use runes in components, pages, and layouts.

Does not use runes in stores (yet).
---
 ui/lib/components/CurrentUser.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'ui/lib/components/CurrentUser.svelte')

diff --git a/ui/lib/components/CurrentUser.svelte b/ui/lib/components/CurrentUser.svelte
index 97ff980..46c76b0 100644
--- a/ui/lib/components/CurrentUser.svelte
+++ b/ui/lib/components/CurrentUser.svelte
@@ -3,7 +3,8 @@
 	import { logOut } from '$lib/apiServer';
 	import { currentUser } from '$lib/store';
 
-	async function handleLogout() {
+	async function handleLogout(event) {
+		event.preventDefault();
 		const response = await logOut();
 		if (200 <= response.status && response.status < 300) {
 			currentUser.update(() => null);
@@ -12,7 +13,7 @@
 	}
 </script>
 
-<form on:submit|preventDefault={handleLogout}>
+<form onsubmit={handleLogout}>
 	{#if $currentUser}
 		<a href="/me">@{$currentUser.username}</a>
 	{/if}
-- 
cgit v1.2.3

