From 99aee9a7281aa9c5794cc062e41384dc3701906d Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Sun, 17 Jul 2022 23:22:08 -0400
Subject: Remove unnecessary function

---
 src/components/Sidebar.svelte | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'src/components/Sidebar.svelte')

diff --git a/src/components/Sidebar.svelte b/src/components/Sidebar.svelte
index 723e073..4a53452 100644
--- a/src/components/Sidebar.svelte
+++ b/src/components/Sidebar.svelte
@@ -25,10 +25,6 @@
     console.log("reading local database");
     parseDatabaseLocal(local_db);
   });
-
-  function chooseSection(sec) {
-    selected = sec;
-  }
 </script>
 
 <!-- Entire Page -->
@@ -53,7 +49,9 @@
           <li>
             <div
               class={selected == sec ? "active" : ""}
-              on:click={() => chooseSection(sec)}
+              on:click={() => {
+                selected = sec;
+              }}
             >
               {sec.name}
             </div>
-- 
cgit v1.2.3

