From 985fa2f7c99832cdf3c3351d2273c8fd05402b78 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Wed, 17 Sep 2025 21:45:18 +0700
Subject: basic comms working

---
 front/src/components/layout/Sidebar.tsx | 46 ++++++++++-----------------------
 1 file changed, 13 insertions(+), 33 deletions(-)

(limited to 'front/src/components/layout/Sidebar.tsx')

diff --git a/front/src/components/layout/Sidebar.tsx b/front/src/components/layout/Sidebar.tsx
index 4055454..d237fb5 100644
--- a/front/src/components/layout/Sidebar.tsx
+++ b/front/src/components/layout/Sidebar.tsx
@@ -1,20 +1,13 @@
 import { RADIO, versionNum } from "@/logic/constants";
 import { useLocation } from "wouter";
 import useLocalState from "@/state/state";
-import key from "@/assets/icons/key.svg";
 import logo from "@/assets/icons/logo.png";
-import home from "@/assets/icons/home.svg";
-import bell from "@/assets/icons/bell.svg";
-import settings from "@/assets/icons/settings.svg";
-import messages from "@/assets/icons/messages.svg";
-import profile from "@/assets/icons/profile.svg";
-import pals from "@/assets/icons/pals.svg";
-import rumors from "@/assets/icons/rumors.svg";
+import Icon from "@/components/Icon";
 import { ThemeSwitcher } from "@/styles/ThemeSwitcher";
 
 function SlidingMenu() {
   const [_, navigate] = useLocation();
-  const { api } = useLocalState();
+  const { api } = useLocalState((s) => ({ api: s.api }));
   function goto(to: string) {
     navigate(to);
   }
@@ -26,21 +19,25 @@ function SlidingMenu() {
       </div>
       <h3>Feeds</h3>
       <div className="opt" role="link" onClick={() => goto(`/feed/global`)}>
-        <img src={home} alt="" />
+        <Icon name="home" size={20} />
         <div>Home</div>
       </div>
       <div className="opt" role="link" onClick={() => goto(`/hark`)}>
-        <img src={bell} alt="" />
+        <Icon name="bell" size={20} />
         <div>Activity</div>
       </div>
       <hr />
 
-      <div className="opt" role="link" onClick={() => goto("/chat")}>
-        <img src={messages} alt="" />
+      <div
+        className="opt tbd"
+        role="link"
+        // onClick={() => goto("/chat")}
+      >
+        <Icon name="messages" size={20} />
         <div>Messages</div>
       </div>
       <div className="opt" role="link" onClick={() => goto("/pals")}>
-        <img src={pals} alt="" />
+        <Icon name="pals" size={20} />
         <div>Pals</div>
       </div>
       <hr />
@@ -49,29 +46,12 @@ function SlidingMenu() {
         role="link"
         onClick={() => goto(`/feed/${api!.airlock.our}`)}
       >
-        <img src={profile} alt="" />
+        <Icon name="profile" size={20} />
         <div>Profile</div>
       </div>
-      <div className="opt" role="link" onClick={() => goto("/feed/anon")}>
-        <img src={rumors} alt="" />
-        <div>Rumors</div>
-      </div>
-      <hr />
-      <div className="opt" role="link" onClick={() => goto("/radio")}>
-        <div className="img">{RADIO}</div>
-        <div>Radio</div>
-      </div>
       <hr />
-      <div
-        className="opt"
-        role="link"
-        onClick={() => (window.location.href = "/cookies")}
-      >
-        <img src={key} alt="" />
-        <div>Logins</div>
-      </div>
       <div className="opt" role="link" onClick={() => goto("/sets")}>
-        <img src={settings} alt="" />
+        <Icon name="settings" size={20} />
         <div>Settings</div>
       </div>
       <ThemeSwitcher />
-- 
cgit v1.2.3

