diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-19 17:14:39 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-19 17:14:39 +0700 |
| commit | c3386e06741165427b50fb7f33682bc0fdcabfce (patch) | |
| tree | 469c2dc103e03fe5e3b2c91e638ab9c2909a6729 /src/pages/my/menu.js | |
| parent | ec870d3599647628974867ac6259d7f141ee85d7 (diff) | |
Checkout with upload PO
Diffstat (limited to 'src/pages/my/menu.js')
| -rw-r--r-- | src/pages/my/menu.js | 70 |
1 files changed, 20 insertions, 50 deletions
diff --git a/src/pages/my/menu.js b/src/pages/my/menu.js index e21b0433..0db6b011 100644 --- a/src/pages/my/menu.js +++ b/src/pages/my/menu.js @@ -7,36 +7,26 @@ import { ArrowRightOnRectangleIcon, ChatBubbleLeftRightIcon, ChevronRightIcon, - ClipboardDocumentIcon, - ClipboardIcon, - ClockIcon, - DocumentArrowDownIcon, MapIcon, PaperClipIcon, PencilSquareIcon, QuestionMarkCircleIcon, ReceiptPercentIcon, - UserIcon + UserIcon, + HeartIcon } from "@heroicons/react/24/outline"; -const activityMenus = [ - { icon: (<ReceiptPercentIcon className="w-5" />), name: 'Daftar Transaksi', url: '/my/profile' }, - { icon: (<ClipboardIcon className="w-5" />), name: 'Penawaran Harga', url: '/my/profile' }, - { icon: (<ClockIcon className="w-5" />), name: 'Purchase Order', url: '/my/profile' }, - { icon: (<DocumentArrowDownIcon className="w-5" />), name: 'Faktur Penjualan', url: '/my/profile' }, - { icon: (<PaperClipIcon className="w-5" />), name: 'Faktur Pajak', url: '/my/profile' }, - { icon: (<ClipboardDocumentIcon className="w-5" />), name: 'Surat Jalan', url: '/my/profile' } -]; - -const serviceMenus = [ - { icon: (<ChatBubbleLeftRightIcon className="w-5"/>), name: 'Customer Support', url: '/my/profile' }, - { icon: (<QuestionMarkCircleIcon className="w-5"/>), name: 'F.A.Q', url: '/my/profile' }, -]; - -const settingMenus = [ - { icon: (<MapIcon className="w-5" />),name: 'Daftar Alamat', url: '/my/address' }, - { icon: (<ArrowRightOnRectangleIcon className="w-5" />),name: 'Keluar Akun', url: '/logout' }, -]; +const Menu = ({ icon, name, url }) => { + return ( + <Link href={url} className="text-gray_r-11 font-normal flex gap-x-2 items-center py-4 border-b border-gray_r-6"> + <span className="flex gap-x-2"> + { icon } + { name } + </span> + <ChevronRightIcon className="w-5 ml-auto"/> + </Link> + ); +}; export default function MyMenu() { const [auth] = useAuth(); @@ -64,41 +54,21 @@ export default function MyMenu() { <div className="px-4 mt-4"> <p className="font-medium mb-2">Aktivitas Pembelian</p> <div className="flex flex-col mb-6"> - { activityMenus.map((menu, index) => ( - <Link href={menu.url} className="text-gray_r-11 font-normal flex gap-x-2 items-center py-4 border-b border-gray_r-6" key={index}> - <span className="flex gap-x-2"> - { menu.icon } - { menu.name } - </span> - <ChevronRightIcon className="w-5 ml-auto"/> - </Link> - )) } + <Menu icon={<ReceiptPercentIcon className="w-5" />} name="Daftar Transaksi" url="/my/transactions" /> + <Menu icon={<PaperClipIcon className="w-5" />} name="Invoice & Faktur Pajak" url="/my/transactions" /> + <Menu icon={<HeartIcon className="w-5" />} name="Wishlist" url="/my/wishlist" /> </div> <p className="font-medium mb-2">Pusat Bantuan</p> <div className="flex flex-col mb-6"> - { serviceMenus.map((menu, index) => ( - <Link href={menu.url} className="text-gray_r-11 font-normal flex gap-x-2 items-center py-4 border-b border-gray_r-6" key={index}> - <span className="flex gap-x-2"> - { menu.icon } - { menu.name } - </span> - <ChevronRightIcon className="w-5 ml-auto"/> - </Link> - )) } + <Menu icon={<ChatBubbleLeftRightIcon className="w-5"/>} name="Layanan Pelanggan" url="/" /> + <Menu icon={<QuestionMarkCircleIcon className="w-5"/>} name="F.A.Q" url="/" /> </div> <p className="font-medium mb-2">Pengaturan Akun</p> <div className="flex flex-col mb-6"> - { settingMenus.map((menu, index) => ( - <Link href={menu.url} className="text-gray_r-11 font-normal flex gap-x-2 items-center py-4 border-b border-gray_r-6" key={index}> - <span className="flex gap-x-2"> - { menu.icon } - { menu.name } - </span> - <ChevronRightIcon className="w-5 ml-auto"/> - </Link> - )) } + <Menu icon={<MapIcon className="w-5" />} name="Daftar Alamat" url="/my/address" /> + <Menu icon={<ArrowRightOnRectangleIcon className="w-5" />} name="Keluar Akun" url="/logout" /> </div> </div> </Layout> |
