import Link from '@/core/components/elements/Link/Link'; import { useRouter } from 'next/router'; import ImageNext from 'next/image'; import whatsappUrl from '@/core/utils/whatsappUrl'; import useAuth from '@/core/hooks/useAuth'; import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js'; import { useState, useEffect } from 'react'; const Menu = () => { const router = useRouter(); const auth = useAuth(); // console.log('auth', auth); const [ubahAkun, setUbahAkun] = useState(); // const [isAprove, setIsAprove] = useState(); useEffect(() => { const loadProgres = async () => { const progresSwitchAccount = await switchAccountProgresApi(); console.log('progresSwitchAccount', progresSwitchAccount); // if (progresSwitchAccount) { // setIsAprove(progresSwitchAccount.status); setUbahAkun(progresSwitchAccount.status); // } }; loadProgres(); }, []); const routeStartWith = (route) => router.pathname.startsWith(route); return (
Akun Saya
{auth?.company && !ubahAkun && (
Akun Bisnis
)} {ubahAkun &&
Review
} {!auth?.company && !ubahAkun && (
Akun Individu
)}
Menu

Daftar Quotation

Daftar Transaksi

Daftar Pengiriman

Invoice & Faktur Pajak

Wishlist

Pusat Bantuan

Layanan Pelanggan

Pengaturan Akun

Daftar Alamat

Profil Saya

); }; const LinkItem = ({ children, ...props }) => ( {children} ); export default Menu;