From 5902664658a36e4afc81327eea9f8eef05561bcb Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Mon, 30 Dec 2024 12:15:35 +0000 Subject: refactor: Refactor sidebar into a shared component --- apps/web/components/shared/sidebar/Sidebar.tsx | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 apps/web/components/shared/sidebar/Sidebar.tsx (limited to 'apps/web/components/shared/sidebar/Sidebar.tsx') diff --git a/apps/web/components/shared/sidebar/Sidebar.tsx b/apps/web/components/shared/sidebar/Sidebar.tsx new file mode 100644 index 00000000..bd5d23e6 --- /dev/null +++ b/apps/web/components/shared/sidebar/Sidebar.tsx @@ -0,0 +1,38 @@ +import { useTranslation } from "@/lib/i18n/server"; +import { TFunction } from "i18next"; + +import serverConfig from "@hoarder/shared/config"; + +import SidebarItem from "./SidebarItem"; +import { TSidebarItem } from "./TSidebarItem"; + +export default async function Sidebar({ + items, + extraSections, +}: { + items: (t: TFunction) => TSidebarItem[]; + extraSections?: React.ReactNode; +}) { + const { t } = await useTranslation(); + + return ( + + ); +} -- cgit v1.2.3-70-g09d2