From 92b99c8d1d890766da55031f921601372d5b49a3 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 3 May 2023 09:14:02 +0700
Subject: default banner brand, whatsapp link, bug fix after transaction

---
 src/lib/brand/components/Brand.jsx | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

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

diff --git a/src/lib/brand/components/Brand.jsx b/src/lib/brand/components/Brand.jsx
index 6ebb8aa7..d570aa8b 100644
--- a/src/lib/brand/components/Brand.jsx
+++ b/src/lib/brand/components/Brand.jsx
@@ -29,6 +29,14 @@ const Brand = ({ id }) => {
         <>
           <div>
             {brand.isLoading && <ImageSkeleton />}
+            {brand.data?.banners?.length == 0 && (
+              <Image
+                src='/images/default-banner-brand.jpg'
+                alt='Brand - Indoteknik'
+                className='w-full'
+                h-auto
+              />
+            )}
             {brand.data && (
               <>
                 <Swiper
@@ -69,10 +77,19 @@ const Brand = ({ id }) => {
           <Divider />
         </>
       </MobileView>
+
       <DesktopView>
         <div className='container mx-auto mt-10 mb-3'>
           <div className='min-h-[150px]'>
             {brand.isLoading && <ImageSkeleton />}
+            {brand.data?.banners?.length == 0 && (
+              <Image
+                src='/images/default-banner-brand.jpg'
+                alt='Brand - Indoteknik'
+                className='w-full'
+                h-auto
+              />
+            )}
             {brand.data && (
               <>
                 <Swiper
-- 
cgit v1.2.3


From baa7cb664e662cee23cdad92c78d9c14cab2445d Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 3 May 2023 15:19:35 +0700
Subject: add whatsapp widget and page not found

---
 src/lib/brand/components/Brand.jsx | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

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

diff --git a/src/lib/brand/components/Brand.jsx b/src/lib/brand/components/Brand.jsx
index d570aa8b..3c411969 100644
--- a/src/lib/brand/components/Brand.jsx
+++ b/src/lib/brand/components/Brand.jsx
@@ -1,5 +1,5 @@
 import useBrand from '../hooks/useBrand'
-import Image from '@/core/components/elements/Image/Image'
+import Image from 'next/image'
 
 import { Swiper, SwiperSlide } from 'swiper/react'
 import { Pagination, Autoplay } from 'swiper'
@@ -33,8 +33,9 @@ const Brand = ({ id }) => {
               <Image
                 src='/images/default-banner-brand.jpg'
                 alt='Brand - Indoteknik'
-                className='w-full'
-                h-auto
+                width={1024}
+                height={512}
+                className='w-full h-auto'
               />
             )}
             {brand.data && (
@@ -51,6 +52,8 @@ const Brand = ({ id }) => {
                       <Image
                         src={banner}
                         alt={`Brand ${brand.data?.name} - Indoteknik`}
+                        width={1024}
+                        height={512}
                         className='w-full h-auto'
                       />
                     </SwiperSlide>
@@ -63,6 +66,8 @@ const Brand = ({ id }) => {
                       src={brand?.data?.logo}
                       alt={brand?.data?.name}
                       className='w-32 p-2 border borde-gray_r-6 rounded'
+                      width={256}
+                      height={128}
                     />
                   )}
                   {!brand?.data?.logo && (
@@ -86,8 +91,9 @@ const Brand = ({ id }) => {
               <Image
                 src='/images/default-banner-brand.jpg'
                 alt='Brand - Indoteknik'
-                className='w-full'
-                h-auto
+                width={1024}
+                height={512}
+                className='w-full h-auto'
               />
             )}
             {brand.data && (
@@ -104,6 +110,8 @@ const Brand = ({ id }) => {
                       <Image
                         src={banner}
                         alt={`Brand ${brand.data?.name} - Indoteknik`}
+                        width={1024}
+                        height={512}
                         className='w-full h-auto'
                       />
                     </SwiperSlide>
@@ -116,6 +124,8 @@ const Brand = ({ id }) => {
                       src={brand?.data?.logo}
                       alt={brand?.data?.name}
                       className='w-32 p-2 border borde-gray_r-6 rounded'
+                      width={1024}
+                      height={512}
                     />
                   )}
                   {!brand?.data?.logo && (
-- 
cgit v1.2.3

