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

---
 .../components/shared/sidebar/MobileSidebar.tsx    | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 apps/web/components/shared/sidebar/MobileSidebar.tsx

(limited to 'apps/web/components/shared/sidebar/MobileSidebar.tsx')

diff --git a/apps/web/components/shared/sidebar/MobileSidebar.tsx b/apps/web/components/shared/sidebar/MobileSidebar.tsx
new file mode 100644
index 00000000..d3edc7df
--- /dev/null
+++ b/apps/web/components/shared/sidebar/MobileSidebar.tsx
@@ -0,0 +1,26 @@
+import { useTranslation } from "@/lib/i18n/server";
+import { TFunction } from "i18next";
+
+import MobileSidebarItem from "./ModileSidebarItem";
+import { TSidebarItem } from "./TSidebarItem";
+
+export default async function MobileSidebar({
+  items,
+}: {
+  items: (t: TFunction) => TSidebarItem[];
+}) {
+  const { t } = await useTranslation();
+  return (
+    <aside className="w-full">
+      <ul className="flex justify-between space-x-2 border-b-black px-5 py-2 pt-5">
+        {items(t).map((item) => (
+          <MobileSidebarItem
+            key={item.name}
+            logo={item.icon}
+            path={item.path}
+          />
+        ))}
+      </ul>
+    </aside>
+  );
+}
-- 
cgit v1.2.3-70-g09d2

