diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-09-25 01:53:07 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-09-25 01:53:07 +0000 |
| commit | ad952b397b1cebcf85b66877da8e949e7e7a891f (patch) | |
| tree | c174d9dabd75a97544884f47b513f5b4b58443a0 /src/lib/brand | |
| parent | 1e834e45f9a11911036496151b71f99de480862e (diff) | |
| parent | a66b690ad0445452816f3ac8f8e98dba2e53ca31 (diff) | |
Merged in perapihan-tag (pull request #331)
Perapihan tag
Approved-by: trisusilo
Diffstat (limited to 'src/lib/brand')
| -rw-r--r-- | src/lib/brand/components/BrandCard.jsx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/lib/brand/components/BrandCard.jsx b/src/lib/brand/components/BrandCard.jsx index 2d78d956..ebd41a67 100644 --- a/src/lib/brand/components/BrandCard.jsx +++ b/src/lib/brand/components/BrandCard.jsx @@ -1,10 +1,10 @@ -import Image from '~/components/ui/image' -import Link from '@/core/components/elements/Link/Link' -import useDevice from '@/core/hooks/useDevice' -import { createSlug } from '@/core/utils/slug' +import NextImage from 'next/image'; +import Link from '@/core/components/elements/Link/Link'; +import useDevice from '@/core/hooks/useDevice'; +import { createSlug } from '@/core/utils/slug'; const BrandCard = ({ brand }) => { - const { isMobile } = useDevice() + const { isMobile } = useDevice(); return ( <Link href={createSlug('/shop/brands/', brand.name, brand.id)} @@ -13,21 +13,25 @@ const BrandCard = ({ brand }) => { }`} > {brand.logo && ( - <Image + <NextImage src={brand.logo} alt={brand.name} - width={50} - height={50} + width={500} + height={500} + quality={85} className='h-full w-[122px] object-contain object-center' /> )} {!brand.logo && ( - <span className='text-center' style={{ fontSize: `${16 - brand.name.length * 0.5}px` }}> + <span + className='text-center' + style={{ fontSize: `${16 - brand.name.length * 0.5}px` }} + > {brand.name} </span> )} </Link> - ) -} + ); +}; -export default BrandCard +export default BrandCard; |
