summaryrefslogtreecommitdiff
path: root/src/pages/my/menu.js
blob: 3e8857ae524458a08a4c01d8e2726176ab941601 (plain)
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

import AppBar from "../../components/AppBar";
import Layout from "../../components/Layout";
import Link from "../../components/Link";
import { useAuth } from "../../helpers/auth";
import {
  ChevronRightIcon,
  Cog6ToothIcon,
  UserIcon
} from "@heroicons/react/24/outline"; 

const menus = [
  { name: 'Riwayat Pesanan', url: '/my/profile' },
  { name: 'Faktur Penjualan', url: '/my/profile' },
  { name: 'Faktur Pajak', url: '/my/profile' },
  { name: 'Surat Jalan', url: '/my/profile' }
];

export default function MyMenu() {
  const [auth, setAuth] = useAuth();

  return (
    <>
      <AppBar title="Menu Utama" />
      <Layout>
        <div className="p-4 flex gap-x-2 items-center">
          <div className="flex-1 flex gap-x-3 items-center">
            <div className="p-2 bg-gray_r-4 rounded-full h-fit">
              <UserIcon className="w-6" />
            </div>
            <div>
              <h2>{ auth.name }</h2>
              <div className="badge-red font-normal text-xs">Akun Bisnis</div>
            </div>
          </div>
          <Link href="/my/profile">
            <Cog6ToothIcon className="w-6 text-yellow_r-12"/>
          </Link>
        </div>

        <div className="px-4 flex flex-col">
          { menus.map((menu, index) => (
            <Link href={menu.url} className="text-gray_r-12 font-normal flex gap-x-2 items-center py-4 border-b border-gray_r-6" key={index}>
              { menu.name } <ChevronRightIcon className="w-5 ml-auto"/>
            </Link>
          )) }
        </div>
      </Layout>
    </>
  );
}