diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-22 11:03:34 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-22 11:03:34 +0700 |
| commit | f66b12fd1d0b83af0d7230d7b1565fbe00afbe3c (patch) | |
| tree | 253dcf854a3c92e09ca846e86a09e5b4c5d16be1 /src/lib/home/components/PreferredBrand.jsx | |
| parent | 3c559031623649a67825ff47f34512f0eb946861 (diff) | |
prettier
Diffstat (limited to 'src/lib/home/components/PreferredBrand.jsx')
| -rw-r--r-- | src/lib/home/components/PreferredBrand.jsx | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/lib/home/components/PreferredBrand.jsx b/src/lib/home/components/PreferredBrand.jsx index 3d3b1b69..de377031 100644 --- a/src/lib/home/components/PreferredBrand.jsx +++ b/src/lib/home/components/PreferredBrand.jsx @@ -1,30 +1,26 @@ -import { Swiper, SwiperSlide } from "swiper/react" -import usePreferredBrand from "../hooks/usePreferredBrand" -import PreferredBrandSkeleton from "./Skeleton/PreferredBrandSkeleton" -import BrandCard from "@/lib/brand/components/BrandCard" +import { Swiper, SwiperSlide } from 'swiper/react' +import usePreferredBrand from '../hooks/usePreferredBrand' +import PreferredBrandSkeleton from './Skeleton/PreferredBrandSkeleton' +import BrandCard from '@/lib/brand/components/BrandCard' const PreferredBrand = () => { const { preferredBrands } = usePreferredBrand() - + return ( - <div className="px-4"> - <div className="font-medium mb-4">Brand Pilihan</div> - { preferredBrands.isLoading && <PreferredBrandSkeleton /> } - { !preferredBrands.isLoading && ( - <Swiper - slidesPerView={3.5} - spaceBetween={8} - freeMode - > - { preferredBrands.data?.manufactures.map((brand) => ( + <div className='px-4'> + <div className='font-medium mb-4'>Brand Pilihan</div> + {preferredBrands.isLoading && <PreferredBrandSkeleton />} + {!preferredBrands.isLoading && ( + <Swiper slidesPerView={3.5} spaceBetween={8} freeMode> + {preferredBrands.data?.manufactures.map((brand) => ( <SwiperSlide key={brand.id}> <BrandCard brand={brand} /> </SwiperSlide> - )) } + ))} </Swiper> - ) } + )} </div> ) } -export default PreferredBrand
\ No newline at end of file +export default PreferredBrand |
