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/routes/(login)/login/+page.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'ui/routes/(login)/login/+page.svelte')

diff --git a/ui/routes/(login)/login/+page.svelte b/ui/routes/(login)/login/+page.svelte
index dba7f5a..77c2d62 100644
--- a/ui/routes/(login)/login/+page.svelte
+++ b/ui/routes/(login)/login/+page.svelte
@@ -9,7 +9,8 @@
 	let pending = false;
 	$: disabled = pending;
 
-	async function onSubmit() {
+	async function onSubmit(event) {
+		event.preventDefault();
 		pending = true;
 		const response = await logIn(username, password);
 		if (200 <= response.status && response.status < 300) {
@@ -21,4 +22,4 @@
 	}
 </script>
 
-<LogIn bind:disabled bind:username bind:password on:submit={onSubmit} />
+<LogIn {disabled} bind:username bind:password onsubmit={onSubmit} />
-- 
cgit v1.2.3

