diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2024-12-03 15:38:11 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2024-12-03 15:38:11 +0700 |
| commit | 57f400411555351f0b96799f5e4493c9c49b68e0 (patch) | |
| tree | d375a2e2d342b8a08736428b8ea8fbecdd37123a | |
| parent | 1b4d7f65ee08a56ca6cc57bfc6336ca3ccad3a21 (diff) | |
update performance
| -rw-r--r-- | src-migrate/components/ui/modal.tsx | 2 | ||||
| -rw-r--r-- | src/core/components/elements/Navbar/NavbarDesktop.jsx | 18 | ||||
| -rw-r--r-- | src/core/components/elements/Navbar/TopBanner.jsx | 1 | ||||
| -rw-r--r-- | src/lib/brand/components/BrandCard.jsx | 1 | ||||
| -rw-r--r-- | src/lib/product/components/ProductCard.jsx | 16 |
5 files changed, 26 insertions, 12 deletions
diff --git a/src-migrate/components/ui/modal.tsx b/src-migrate/components/ui/modal.tsx index 34e1d1c3..50e7128f 100644 --- a/src-migrate/components/ui/modal.tsx +++ b/src-migrate/components/ui/modal.tsx @@ -71,7 +71,7 @@ export const Modal = ({ {title} </div> {close && ( - <button className="rounded-full h-10 w-10 flex justify-center items-center bg-white" type='button' onClick={close}> + <button className="rounded-full h-10 w-10 flex justify-center items-center bg-white" type='button' aria-label="Close" onClick={close}> <XMarkIcon className='w-5 h-5 ' /> </button> )} diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx index f4b0d5e1..7d6d8c9e 100644 --- a/src/core/components/elements/Navbar/NavbarDesktop.jsx +++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx @@ -387,10 +387,11 @@ const SocialMedias = () => ( target='_blank' rel='noreferrer' href='https://www.youtube.com/@indoteknikcom' + aria-label='Youtube - Indoteknik.com' > <NextImage src='/images/socials/youtube.webp' - // alt='Youtube - Indoteknik.com' + alt='Ytube' width={24} height={24} loading='eager' @@ -400,10 +401,11 @@ const SocialMedias = () => ( target='_blank' rel='noreferrer' href='https://www.tiktok.com/@indoteknikcom' + aria-label='TikTok - Indoteknik.com' > <NextImage src='/images/socials/tiktok.png' - // alt='TikTok - Indoteknik.com' + alt='TikTok' width={24} height={24} loading='eager' @@ -421,10 +423,11 @@ const SocialMedias = () => ( target='_blank' rel='noreferrer' href='https://www.facebook.com/indoteknikcom' + aria-label='Facebook - Indoteknik.com' > <NextImage src='/images/socials/Facebook.png' - // alt='Facebook - Indoteknik.com' + alt='FB' width={24} height={24} loading='eager' @@ -434,10 +437,11 @@ const SocialMedias = () => ( target='_blank' rel='noreferrer' href='https://www.instagram.com/indoteknikcom/' + aria-label='Instagram - Indoteknik.com' > <NextImage src='/images/socials/Instagram.png' - // alt='Instagram - Indoteknik.com' + alt='IG' width={24} height={24} loading='eager' @@ -447,10 +451,11 @@ const SocialMedias = () => ( target='_blank' rel='noreferrer' href='https://www.linkedin.com/company/pt-indoteknik-dotcom-gemilang/' + aria-label='Linkedin - Indoteknik.com' > <NextImage src='/images/socials/Linkedin.png' - // alt='Linkedin - Indoteknik.com' + alt='Linkedin' width={24} height={24} loading='eager' @@ -460,10 +465,11 @@ const SocialMedias = () => ( target='_blank' rel='noreferrer' href='https://goo.gl/maps/GF8EmDjpQTHZPsJ1A' + aria-label='Maps - Indoteknik.com' > <NextImage src='/images/socials/g_maps.png' - // alt='Maps - Indoteknik.com' + alt='Maps' width={24} height={24} loading='eager' diff --git a/src/core/components/elements/Navbar/TopBanner.jsx b/src/core/components/elements/Navbar/TopBanner.jsx index 709495ce..7d44846c 100644 --- a/src/core/components/elements/Navbar/TopBanner.jsx +++ b/src/core/components/elements/Navbar/TopBanner.jsx @@ -50,6 +50,7 @@ const TopBanner = ({ onLoad = () => {} }) => { <Link href={data?.url} className='block bg-cover bg-center h-3 md:h-6 lg:h-[36px]' + aria-label='panduan pick up barang' style={{ backgroundImage: `url('${data?.image}')`, }} diff --git a/src/lib/brand/components/BrandCard.jsx b/src/lib/brand/components/BrandCard.jsx index 8bb4b904..dff61b24 100644 --- a/src/lib/brand/components/BrandCard.jsx +++ b/src/lib/brand/components/BrandCard.jsx @@ -11,6 +11,7 @@ const BrandCard = ({ brand }) => { className={`py-1 px-2 border-gray_r-6 flex justify-center items-center hover:scale-110 transition duration-500 ease-in-out ${ isMobile ? 'h-16' : 'h-24' }`} + aria-label={brand.name} > {brand.logo && ( <NextImage diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx index 4e80083b..2291398d 100644 --- a/src/lib/product/components/ProductCard.jsx +++ b/src/lib/product/components/ProductCard.jsx @@ -73,7 +73,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { if (variant == 'vertical') { return ( - <div className='rounded shadow-sm border border-gray_r-4 bg-white h-[330px] md:h-[380px]'> + <div className='rounded shadow-sm border border-gray_r-4 bg-white h-[330px] md:h-[380px]' aria-label='Produk'> <Link href={URL.product} className='border-b border-gray_r-4 relative'> <div className='relative'> <Image @@ -154,14 +154,14 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { <div className='p-2 sm:p-3 pb-3 text-caption-2 sm:text-body-2 leading-5'> <div className='flex justify-between '> {product?.manufacture?.name ? ( - <Link href={URL.manufacture} className='mb-1 mt-1 truncate'> + <Link href={URL.manufacture} className='mb-1 mt-1 truncate' aria-label={product.manufacture.name}> {product.manufacture.name} </Link> ) : ( <div>-</div> )} {product?.isInBu && ( - <Link href='/panduan-pick-up-service' className='group'> + <Link href='/panduan-pick-up-service' className='group' aria-label='pickup now'> <Image src='/images/PICKUP-NOW.png' className='group-hover:scale-105 transition-transform duration-200' @@ -175,6 +175,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { </div> <Link href={URL.product} + aria-label={product?.name} className={`mb-2 !text-gray_r-12 leading-6 block line-clamp-3 h-[64px]`} title={product?.name} > @@ -199,6 +200,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp} + aria-label='Call for Inquiry' > Call for Inquiry </a> @@ -222,6 +224,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp} + aria-label='Call for Inquiry' > Call for Inquiry </a> @@ -256,7 +259,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { return ( <div className='flex bg-white'> <div className='w-4/12'> - <Link href={URL.product} className='relative'> + <Link href={URL.product} className='relative' aria-label={product?.name}> <div className='relative'> <Image src={image} @@ -316,7 +319,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )} {product?.manufacture?.name ? ( <div className='flex justify-between'> - <Link href={URL.manufacture} className='mb-1'> + <Link href={URL.manufacture} className='mb-1' aria-label={product?.manufacture.name}> {product.manufacture.name} </Link> {/* {product?.is_in_bu && ( @@ -332,6 +335,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { )} <Link href={URL.product} + aria-label={product?.name} className={`mb-3 !text-gray_r-12 leading-6 line-clamp-3`} > {product?.name} @@ -358,6 +362,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp} + aria-label='Call for Inquiry' > Call for Inquiry </a> @@ -381,6 +386,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => { rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp} + aria-label='Call for Inquiry' > Call for Inquiry </a> |
