From f99e0aba70efad0deb907d8e27f09fc9f527c8a4 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 17 Feb 2023 17:07:50 +0700
Subject: Refactor

---
 src/lib/brand/components/BrandCard.jsx | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 src/lib/brand/components/BrandCard.jsx

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

diff --git a/src/lib/brand/components/BrandCard.jsx b/src/lib/brand/components/BrandCard.jsx
new file mode 100644
index 00000000..8783010e
--- /dev/null
+++ b/src/lib/brand/components/BrandCard.jsx
@@ -0,0 +1,20 @@
+import Image from "@/core/components/elements/Image/Image"
+import Link from "@/core/components/elements/Link/Link"
+import { createSlug } from "@/core/utils/slug"
+
+const BrandCard = ({ brand }) => {
+  return (
+    <Link 
+      href={createSlug('/shop/brands/', brand.name, brand.id)} 
+      className="py-1 px-2 rounded border border-gray_r-6"
+    >
+      <Image 
+        src={brand.logo}
+        alt={brand.name}
+        className="h-10 object-contain object-center"
+      />
+    </Link>
+  )
+}
+
+export default BrandCard
\ No newline at end of file
-- 
cgit v1.2.3


From f66b12fd1d0b83af0d7230d7b1565fbe00afbe3c Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 22 Feb 2023 11:03:34 +0700
Subject: prettier

---
 src/lib/brand/components/BrandCard.jsx | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 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 8783010e..0dbdc075 100644
--- a/src/lib/brand/components/BrandCard.jsx
+++ b/src/lib/brand/components/BrandCard.jsx
@@ -1,20 +1,16 @@
-import Image from "@/core/components/elements/Image/Image"
-import Link from "@/core/components/elements/Link/Link"
-import { createSlug } from "@/core/utils/slug"
+import Image from '@/core/components/elements/Image/Image'
+import Link from '@/core/components/elements/Link/Link'
+import { createSlug } from '@/core/utils/slug'
 
 const BrandCard = ({ brand }) => {
   return (
-    <Link 
-      href={createSlug('/shop/brands/', brand.name, brand.id)} 
-      className="py-1 px-2 rounded border border-gray_r-6"
+    <Link
+      href={createSlug('/shop/brands/', brand.name, brand.id)}
+      className='py-1 px-2 rounded border border-gray_r-6'
     >
-      <Image 
-        src={brand.logo}
-        alt={brand.name}
-        className="h-10 object-contain object-center"
-      />
+      <Image src={brand.logo} alt={brand.name} className='h-10 object-contain object-center' />
     </Link>
   )
 }
 
-export default BrandCard
\ No newline at end of file
+export default BrandCard
-- 
cgit v1.2.3


From ac3fdf7be9982e65d8f83a20bc487f8dd62e3bfc Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 22 Feb 2023 23:36:47 +0700
Subject: fix

---
 src/lib/brand/components/BrandCard.jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(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 0dbdc075..e981c0d5 100644
--- a/src/lib/brand/components/BrandCard.jsx
+++ b/src/lib/brand/components/BrandCard.jsx
@@ -8,7 +8,11 @@ const BrandCard = ({ brand }) => {
       href={createSlug('/shop/brands/', brand.name, brand.id)}
       className='py-1 px-2 rounded border border-gray_r-6'
     >
-      <Image src={brand.logo} alt={brand.name} className='h-10 object-contain object-center' />
+      <Image
+        src={brand.logo}
+        alt={brand.name}
+        className='h-10 object-contain object-center'
+      />
     </Link>
   )
 }
-- 
cgit v1.2.3


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

