From 5902664658a36e4afc81327eea9f8eef05561bcb Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Mon, 30 Dec 2024 12:15:35 +0000
Subject: refactor: Refactor sidebar into a shared component

---
 apps/web/components/settings/sidebar/Sidebar.tsx | 36 ------------------------
 1 file changed, 36 deletions(-)
 delete mode 100644 apps/web/components/settings/sidebar/Sidebar.tsx

(limited to 'apps/web/components/settings/sidebar/Sidebar.tsx')

diff --git a/apps/web/components/settings/sidebar/Sidebar.tsx b/apps/web/components/settings/sidebar/Sidebar.tsx
deleted file mode 100644
index a1b61e98..00000000
--- a/apps/web/components/settings/sidebar/Sidebar.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import { redirect } from "next/navigation";
-import SidebarItem from "@/components/shared/sidebar/SidebarItem";
-import { useTranslation } from "@/lib/i18n/server";
-import { getServerAuthSession } from "@/server/auth";
-
-import serverConfig from "@hoarder/shared/config";
-
-import { settingsSidebarItems } from "./items";
-
-export default async function Sidebar() {
-  const { t } = await useTranslation();
-  const session = await getServerAuthSession();
-  if (!session) {
-    redirect("/");
-  }
-
-  return (
-    <aside className="flex h-[calc(100vh-64px)] w-60 flex-col gap-5 border-r p-4 ">
-      <div>
-        <ul className="space-y-2 text-sm font-medium">
-          {settingsSidebarItems(t).map((item) => (
-            <SidebarItem
-              key={item.name}
-              logo={item.icon}
-              name={item.name}
-              path={item.path}
-            />
-          ))}
-        </ul>
-      </div>
-      <div className="mt-auto flex items-center border-t pt-2 text-sm text-gray-400">
-        Hoarder v{serverConfig.serverVersion}
-      </div>
-    </aside>
-  );
-}
-- 
cgit v1.2.3-70-g09d2

