import React from 'react' import { ToastContainer, toast } from 'react-toastify' import { router, usePage } from '@inertiajs/react' import { HiOutlineHome, HiOutlineUserCircle } from 'react-icons/hi' import { HiArrowPathRoundedSquare, HiBars3, HiOutlineShoppingCart, } from 'react-icons/hi2' export default function CustomerLayout({ children }) { const { props: { auth: { user }, }, } = usePage() const handleOnClick = (r) => { router.get(route(r)) } const isActive = (r) => { if (route().current(r)) { return 'text-blue-700' } return 'text-gray-600' } return (
{children}
handleOnClick('home.index')} >
Beranda
1
Keranjang
Transaksi
handleOnClick( user !== null ? 'customer.profile.index' : 'customer.login' ) } >
Menu
) }