From 2dd5b10049ff62656f160a9aa5b6627cd7ccbefc Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 23 Feb 2023 15:29:35 +0700
Subject: fix

---
 src/lib/brand/components/BrandCard.jsx | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

(limited to 'src/lib/brand/components/BrandCard.jsx')

diff --git a/src/lib/brand/components/BrandCard.jsx b/src/lib/brand/components/BrandCard.jsx
index e981c0d5..1bcdb5ab 100644
--- a/src/lib/brand/components/BrandCard.jsx
+++ b/src/lib/brand/components/BrandCard.jsx
@@ -6,13 +6,23 @@ const BrandCard = ({ brand }) => {
   return (
     <Link
       href={createSlug('/shop/brands/', brand.name, brand.id)}
-      className='py-1 px-2 rounded border border-gray_r-6'
+      className='py-1 px-2 rounded border border-gray_r-6 h-12 flex justify-center items-center'
     >
-      <Image
-        src={brand.logo}
-        alt={brand.name}
-        className='h-10 object-contain object-center'
-      />
+      {brand.logo && (
+        <Image
+          src={brand.logo}
+          alt={brand.name}
+          className='h-full object-contain object-center'
+        />
+      )}
+      {!brand.logo && (
+        <span
+          className='text-center'
+          style={{ fontSize: `${14 - brand.name.length * 0.5}px` }}
+        >
+          {brand.name}
+        </span>
+      )}
     </Link>
   )
 }
-- 
cgit v1.2.3

