From f66b12fd1d0b83af0d7230d7b1565fbe00afbe3c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 11:03:34 +0700 Subject: prettier --- src/lib/brand/components/Brand.jsx | 66 +++++++++++++++++----------------- src/lib/brand/components/BrandCard.jsx | 20 +++++------ 2 files changed, 41 insertions(+), 45 deletions(-) (limited to 'src/lib/brand/components') diff --git a/src/lib/brand/components/Brand.jsx b/src/lib/brand/components/Brand.jsx index c1215976..c338c4c4 100644 --- a/src/lib/brand/components/Brand.jsx +++ b/src/lib/brand/components/Brand.jsx @@ -1,13 +1,13 @@ -import useBrand from "../hooks/useBrand" -import Image from "@/core/components/elements/Image/Image" +import useBrand from '../hooks/useBrand' +import Image from '@/core/components/elements/Image/Image' -import { Swiper, SwiperSlide } from "swiper/react" -import { Pagination, Autoplay } from "swiper" -import "swiper/css" -import "swiper/css/pagination" -import "swiper/css/autoplay" -import Divider from "@/core/components/elements/Divider/Divider" -import ImageSkeleton from "@/core/components/elements/Skeleton/ImageSkeleton" +import { Swiper, SwiperSlide } from 'swiper/react' +import { Pagination, Autoplay } from 'swiper' +import 'swiper/css' +import 'swiper/css/pagination' +import 'swiper/css/autoplay' +import Divider from '@/core/components/elements/Divider/Divider' +import ImageSkeleton from '@/core/components/elements/Skeleton/ImageSkeleton' const swiperBanner = { pagination: { dynamicBullets: true }, @@ -20,51 +20,51 @@ const swiperBanner = { const Brand = ({ id }) => { const { brand } = useBrand({ id }) - + return ( <> -
- { brand.isLoading && } - { brand.data && ( +
+ {brand.isLoading && } + {brand.data && ( <> - { brand.data?.banners?.map((banner, index) => ( + {brand.data?.banners?.map((banner, index) => ( - {`Brand - )) } + ))} -
-
Produk dari brand:
- { brand?.data?.logo && ( - {brand?.data?.name} +
Produk dari brand:
+ {brand?.data?.logo && ( + {brand?.data?.name} - ) } - { !brand?.data?.logo && ( -
- { brand?.data?.name } + )} + {!brand?.data?.logo && ( +
+ {brand?.data?.name}
- ) } + )}
- ) } + )}
) } -export default Brand \ No newline at end of file +export default Brand 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 ( - - {brand.name} + {brand.name} ) } -export default BrandCard \ No newline at end of file +export default BrandCard -- cgit v1.2.3