summaryrefslogtreecommitdiff
path: root/src/lib/home/components/HeroBanner.jsx
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-02-22 11:03:34 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-02-22 11:03:34 +0700
commitf66b12fd1d0b83af0d7230d7b1565fbe00afbe3c (patch)
tree253dcf854a3c92e09ca846e86a09e5b4c5d16be1 /src/lib/home/components/HeroBanner.jsx
parent3c559031623649a67825ff47f34512f0eb946861 (diff)
prettier
Diffstat (limited to 'src/lib/home/components/HeroBanner.jsx')
-rw-r--r--src/lib/home/components/HeroBanner.jsx42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/lib/home/components/HeroBanner.jsx b/src/lib/home/components/HeroBanner.jsx
index 604ca8ac..6f39ac50 100644
--- a/src/lib/home/components/HeroBanner.jsx
+++ b/src/lib/home/components/HeroBanner.jsx
@@ -1,13 +1,13 @@
-import ImageSkeleton from "@/core/components/elements/Skeleton/ImageSkeleton"
-import useHeroBanner from "../hooks/useHeroBanner"
-import Image from "@/core/components/elements/Image/Image"
+import ImageSkeleton from '@/core/components/elements/Skeleton/ImageSkeleton'
+import useHeroBanner from '../hooks/useHeroBanner'
+import Image from '@/core/components/elements/Image/Image'
// Swiper
-import { Swiper, SwiperSlide } from "swiper/react"
-import { Pagination, Autoplay } from "swiper"
-import "swiper/css"
-import "swiper/css/pagination"
-import "swiper/css/autoplay"
+import { Swiper, SwiperSlide } from 'swiper/react'
+import { Pagination, Autoplay } from 'swiper'
+import 'swiper/css'
+import 'swiper/css/pagination'
+import 'swiper/css/autoplay'
const swiperBanner = {
pagination: { dynamicBullets: true },
@@ -20,31 +20,27 @@ const swiperBanner = {
const HeroBanner = () => {
const { heroBanners } = useHeroBanner()
-
+
return (
- <div className="min-h-[200px]">
- { heroBanners.isLoading && <ImageSkeleton /> }
- { !heroBanners.isLoading && (
+ <div className='min-h-[200px]'>
+ {heroBanners.isLoading && <ImageSkeleton />}
+ {!heroBanners.isLoading && (
<Swiper
slidesPerView={1}
- pagination={swiperBanner.pagination}
+ pagination={swiperBanner.pagination}
modules={swiperBanner.modules}
autoplay={swiperBanner.autoplay}
- className="border-b border-gray_r-6"
+ className='border-b border-gray_r-6'
>
- { heroBanners.data?.map((banner, index) => (
+ {heroBanners.data?.map((banner, index) => (
<SwiperSlide key={index}>
- <Image
- src={banner.image}
- alt={banner.name}
- className="w-full h-auto"
- />
+ <Image src={banner.image} alt={banner.name} className='w-full h-auto' />
</SwiperSlide>
- )) }
+ ))}
</Swiper>
- ) }
+ )}
</div>
)
}
-export default HeroBanner \ No newline at end of file
+export default HeroBanner