aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/(dash)/menu.tsx
blob: 5f26f54592a4055c6c207878b6f76479e5cbd28d (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import React from "react";
import Image from "next/image";
import { MemoriesIcon, ExploreIcon, HistoryIcon } from "@repo/ui/icons";
import Link from "next/link";

function Menu() {
  const menuItems = [
    {
      icon: MemoriesIcon,
      text: "Memories",
      url: "/memories",
    },
    {
      icon: ExploreIcon,
      text: "Explore",
      url: "/explore",
    },
    {
      icon: HistoryIcon,
      text: "History",
      url: "/history",
    },
  ];

  return (
    <div className="fixed h-screen pb-[25vh] w-full p-4 flex items-end justify-end lg:justify-start lg:items-center top-0 left-0 pointer-events-none">
      <div className="">
        <div className="pointer-events-auto group flex w-14 text-foreground-menu text-[15px] font-medium flex-col items-start gap-6 overflow-hidden rounded-[28px] bg-secondary px-3 py-4 duration-200 hover:w-40">
          {menuItems.map((item) => (
            <Link
              href={item.url}
              key={item.url}
              className="flex w-full cursor-pointer items-center gap-3 px-1 duration-200 hover:scale-105 hover:brightness-150 active:scale-90 justify-end md:justify-start"
            >
              <p className="md:hidden opacity-0 duration-200 group-hover:opacity-100">
                {item.text}
              </p>
              <Image
                src={item.icon}
                alt={`${item.text} icon`}
                className="hover:brightness-125 duration-200 "
              />
              <p className="hidden md:block opacity-0 duration-200 group-hover:opacity-100">
                {item.text}
              </p>
            </Link>
          ))}
        </div>
      </div>
    </div>
  );
}

export default Menu;