aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/shared/sidebar/MobileSidebar.tsx
blob: 15285a9e7f485e8da2e490c452972048fe544258 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 overflow-x-auto">
      <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>
  );
}