From fe7880e6f36abb8d2c25398844790274cd08c78b Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Fri, 21 Feb 2025 12:01:13 +0100
Subject: frontend: Inline select method in UpdateModeSelector

---
 frontend/src/lib/dialogs/components/UpdateModeSelector.svelte | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'frontend/src/lib/dialogs/components/UpdateModeSelector.svelte')

diff --git a/frontend/src/lib/dialogs/components/UpdateModeSelector.svelte b/frontend/src/lib/dialogs/components/UpdateModeSelector.svelte
index 67f5ab2..1a2307d 100644
--- a/frontend/src/lib/dialogs/components/UpdateModeSelector.svelte
+++ b/frontend/src/lib/dialogs/components/UpdateModeSelector.svelte
@@ -3,10 +3,6 @@
 	import { UpdateModeLabel } from '$lib/Enums';
 
 	let { mode = $bindable() }: { mode: UpdateMode } = $props();
-
-	function select(e: string) {
-		mode = e as UpdateMode;
-	}
 </script>
 
 <div class="flex gap-1 pb-1 text-xs">
@@ -16,7 +12,7 @@
 			class:active={mode === e}
 			class:dangerous={mode !== UpdateMode.Add}
 			class="btn-xs hover:bg-slate-700 [&.active]:bg-indigo-700 [&.active.dangerous]:bg-rose-800"
-			onclick={() => select(e)}
+			onclick={() => (mode = e as UpdateMode)}
 		>
 			{label}
 		</button>
-- 
cgit v1.2.3-2-gb3c3

