From f5519657dbfdf8ef5ea55e366aaec217ce6f1b71 Mon Sep 17 00:00:00 2001 From: Aji Kamaludin Date: Thu, 8 Jun 2023 10:46:20 +0700 Subject: [PATCH] bit optimize --- resources/js/Customer/Index/Index.jsx | 2 ++ resources/js/Customer/Index/UserBanner.jsx | 5 +++-- resources/js/Layouts/CustomerLayout.jsx | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/js/Customer/Index/Index.jsx b/resources/js/Customer/Index/Index.jsx index 41b0160..7b8c923 100644 --- a/resources/js/Customer/Index/Index.jsx +++ b/resources/js/Customer/Index/Index.jsx @@ -101,7 +101,9 @@ export default function Index(props) { handleBanner(banner)} key={banner.id} + loading='lazy' src={banner.image_url} + alt={banner.title} className={`rounded w-${ banners.length === 1 ? 'full' : '[80%]' } min-w-[340px] h-28 object-cover`} diff --git a/resources/js/Customer/Index/UserBanner.jsx b/resources/js/Customer/Index/UserBanner.jsx index 78663ca..44da08d 100644 --- a/resources/js/Customer/Index/UserBanner.jsx +++ b/resources/js/Customer/Index/UserBanner.jsx @@ -1,7 +1,8 @@ import React from 'react' -import { HiOutlineCash, HiOutlineBell } from 'react-icons/hi' -import BalanceBanner from './BalanceBanner' import { router, usePage } from '@inertiajs/react' +import { HiOutlineBell } from 'react-icons/hi' + +import BalanceBanner from './BalanceBanner' export default function UserBanner({ user }) { const { diff --git a/resources/js/Layouts/CustomerLayout.jsx b/resources/js/Layouts/CustomerLayout.jsx index e81c5b1..52b221b 100644 --- a/resources/js/Layouts/CustomerLayout.jsx +++ b/resources/js/Layouts/CustomerLayout.jsx @@ -2,11 +2,10 @@ import React, { useEffect } from 'react' import { ToastContainer, toast } from 'react-toastify' import { router, usePage } from '@inertiajs/react' -import { HiOutlineHome, HiOutlineUserCircle } from 'react-icons/hi' +import { HiOutlineHome } from 'react-icons/hi' import { HiArrowPathRoundedSquare, HiBars3, - HiGift, HiOutlineGift, HiOutlineShoppingCart, } from 'react-icons/hi2'