From ffa261e6adef70a2845878cf93e6e492eb8cee62 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Mon, 27 Feb 2023 10:49:45 +0700
Subject: footer

---
 src/pages/my/menu.jsx | 91 ++++++++++++++++++++++++++-------------------------
 1 file changed, 47 insertions(+), 44 deletions(-)

(limited to 'src/pages/my/menu.jsx')

diff --git a/src/pages/my/menu.jsx b/src/pages/my/menu.jsx
index 576919ae..40c84668 100644
--- a/src/pages/my/menu.jsx
+++ b/src/pages/my/menu.jsx
@@ -3,6 +3,7 @@ import Link from '@/core/components/elements/Link/Link'
 import AppLayout from '@/core/components/layouts/AppLayout'
 import useAuth from '@/core/hooks/useAuth'
 import { deleteAuth } from '@/core/utils/auth'
+import IsAuth from '@/lib/auth/components/IsAuth'
 import { ChevronRightIcon, UserIcon } from '@heroicons/react/24/solid'
 import { useRouter } from 'next/router'
 
@@ -16,62 +17,64 @@ export default function Menu() {
   }
 
   return (
-    <AppLayout title='Menu Utama'>
-      <Link
-        href='/my/profile'
-        className='p-4 flex items-center'
-      >
-        <div className='rounded-full p-3 bg-gray_r-6 text-gray_r-12/80'>
-          <UserIcon className='w-5' />
-        </div>
-        <div className='ml-4'>
-          <div className='font-semibold text-gray_r-12'>{auth?.name}</div>
-          {auth?.company && <div className='badge-solid-red mt-1'>Akun Bisnis</div>}
-          {!auth?.company && <div className='badge-gray mt-1'>Akun Individu</div>}
-        </div>
-        <div className='ml-auto !text-gray_r-12'>
-          <ChevronRightIcon className='w-6' />
-        </div>
-      </Link>
+    <IsAuth>
+      <AppLayout title='Menu Utama'>
+        <Link
+          href='/my/profile'
+          className='p-4 flex items-center'
+        >
+          <div className='rounded-full p-3 bg-gray_r-6 text-gray_r-12/80'>
+            <UserIcon className='w-5' />
+          </div>
+          <div className='ml-4'>
+            <div className='font-semibold text-gray_r-12'>{auth?.name}</div>
+            {auth?.company && <div className='badge-solid-red mt-1'>Akun Bisnis</div>}
+            {!auth?.company && <div className='badge-gray mt-1'>Akun Individu</div>}
+          </div>
+          <div className='ml-auto !text-gray_r-12'>
+            <ChevronRightIcon className='w-6' />
+          </div>
+        </Link>
 
-      <Divider />
+        <Divider />
 
-      <div className='flex flex-col gap-y-6 py-6'>
-        <div>
-          <MenuHeader>Aktivitas Pembelian</MenuHeader>
+        <div className='flex flex-col gap-y-6 py-6'>
+          <div>
+            <MenuHeader>Aktivitas Pembelian</MenuHeader>
 
-          <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
-            <LinkItem href='/my/transactions'>Daftar Transaksi</LinkItem>
-            <LinkItem href='/my/invoices'>Invoice & Faktur Pajak</LinkItem>
-            <LinkItem href='/my/wishlist'>Wishlist</LinkItem>
+            <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
+              <LinkItem href='/my/transactions'>Daftar Transaksi</LinkItem>
+              <LinkItem href='/my/invoices'>Invoice & Faktur Pajak</LinkItem>
+              <LinkItem href='/my/wishlist'>Wishlist</LinkItem>
+            </div>
           </div>
-        </div>
 
-        <div>
-          <MenuHeader>Pusat Bantuan</MenuHeader>
+          <div>
+            <MenuHeader>Pusat Bantuan</MenuHeader>
 
-          <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
-            <LinkItem href='/'>Customer Support</LinkItem>
-            <LinkItem href='/'>F.A.Q</LinkItem>
+            <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
+              <LinkItem href='/'>Customer Support</LinkItem>
+              <LinkItem href='/'>F.A.Q</LinkItem>
+            </div>
           </div>
-        </div>
 
-        <div>
-          <MenuHeader>Pengaturan Akun</MenuHeader>
+          <div>
+            <MenuHeader>Pengaturan Akun</MenuHeader>
 
-          <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
-            <LinkItem href='/my/address'>Daftar Alamat</LinkItem>
-          </div>
+            <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
+              <LinkItem href='/my/address'>Daftar Alamat</LinkItem>
+            </div>
 
-          <div
-            onClick={logout}
-            className='p-4 mt-2'
-          >
-            <button className='w-full btn-red'>Keluar Akun</button>
+            <div
+              onClick={logout}
+              className='p-4 mt-2'
+            >
+              <button className='w-full btn-red'>Keluar Akun</button>
+            </div>
           </div>
         </div>
-      </div>
-    </AppLayout>
+      </AppLayout>
+    </IsAuth>
   )
 }
 
-- 
cgit v1.2.3

