From 961d68ecdd7cb503889fc23e47490673d52bb5ac Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 12 May 2023 16:32:58 +0700
Subject: swiper loop slide

---
 src/lib/home/components/HeroBanner.jsx | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

(limited to 'src/lib/home/components/HeroBanner.jsx')

diff --git a/src/lib/home/components/HeroBanner.jsx b/src/lib/home/components/HeroBanner.jsx
index 50cfc0ff..889bb2ce 100644
--- a/src/lib/home/components/HeroBanner.jsx
+++ b/src/lib/home/components/HeroBanner.jsx
@@ -15,22 +15,23 @@ import Link from '@/core/components/elements/Link/Link'
 const HeroBanner = () => {
   const { heroBanners } = useHeroBanner()
 
-  const swiperBannerMobile = {
-    pagination: { dynamicBullets: true, clickable: true },
+  const swiperBanner = {
     autoplay: {
       delay: 6000,
       disableOnInteraction: false
     },
-    modules: [Pagination, Autoplay]
+    modules: [Pagination, Autoplay],
+    loop: true
+  }
+
+  const swiperBannerMobile = {
+    ...swiperBanner,
+    pagination: { dynamicBullets: true, clickable: true }
   }
 
   const swiperBannerDesktop = {
-    pagination: { dynamicBullets: false, clickable: true },
-    autoplay: {
-      delay: 6000,
-      disableOnInteraction: false
-    },
-    modules: [Pagination, Autoplay]
+    ...swiperBanner,
+    pagination: { dynamicBullets: false, clickable: true }
   }
 
   return (
-- 
cgit v1.2.3

