import React, { useEffect } from 'react' import { ToastContainer, toast } from 'react-toastify' import { router, usePage } from '@inertiajs/react' import { HiOutlineHome } from 'react-icons/hi' import { HiArrowPathRoundedSquare, HiBars3, HiOutlineGift, HiOutlineShoppingCart, } from 'react-icons/hi2' export default function CustomerLayout({ children }) { const { props: { auth: { user }, cart_count, flash, }, } = usePage() const handleOnClick = (r) => { router.get(route(r, { direct: 1 })) } const isActive = (r) => { if (route().current(r)) { return 'text-blue-700 font-bold' } return 'text-gray-600 font-light' } useEffect(() => { if (flash.message !== null) { toast(flash.message.message, { type: flash.message.type }) } }, [flash]) return (