import React, { useEffect, useState } from 'react' import toast, { Toaster } from 'react-hot-toast' 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 [bounce, setBouce] = useState(false) const handleOnClick = (r) => { router.get(route(r, { direct: 1 })) } const isActive = (r) => { if (route().current(r)) { return 'text-primary-900 font-bold' } return 'text-gray-600 font-light' } const clearAnimate = () => { setBouce(false) } useEffect(() => { let se if (flash.message !== null && flash.message.type !== null) { toast.success((t) => { return (