diff options
Diffstat (limited to 'src/lib/product')
| -rw-r--r-- | src/lib/product/components/ProductFilter.jsx | 22 | ||||
| -rw-r--r-- | src/lib/product/components/ProductSearch.jsx | 13 | ||||
| -rw-r--r-- | src/lib/product/components/ProductSlider.jsx | 10 |
3 files changed, 37 insertions, 8 deletions
diff --git a/src/lib/product/components/ProductFilter.jsx b/src/lib/product/components/ProductFilter.jsx index d920cfb8..eca95f74 100644 --- a/src/lib/product/components/ProductFilter.jsx +++ b/src/lib/product/components/ProductFilter.jsx @@ -35,7 +35,11 @@ const ProductFilter = ({ active, close, brands, categories, prefixUrl, defaultBr } return ( - <BottomPopup active={active} close={close} title='Filter Produk'> + <BottomPopup + active={active} + close={close} + title='Filter Produk' + > <div className='flex flex-col gap-y-4'> {!defaultBrand && ( <div> @@ -48,7 +52,10 @@ const ProductFilter = ({ active, close, brands, categories, prefixUrl, defaultBr > <option value=''>Pilih Brand...</option> {brands.map((brand, index) => ( - <option value={brand} key={index}> + <option + value={brand} + key={index} + > {brand} </option> ))} @@ -65,7 +72,10 @@ const ProductFilter = ({ active, close, brands, categories, prefixUrl, defaultBr > <option value=''>Pilih Kategori...</option> {categories.map((category, index) => ( - <option value={category} key={index}> + <option + value={category} + key={index} + > {category} </option> ))} @@ -107,7 +117,11 @@ const ProductFilter = ({ active, close, brands, categories, prefixUrl, defaultBr /> </div> </div> - <button type='button' className='btn-solid-red w-full mt-2' onClick={handleSubmit}> + <button + type='button' + className='btn-solid-red w-full mt-2' + onClick={handleSubmit} + > Terapkan Filter </button> </div> diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx index 25d0278f..52bd5119 100644 --- a/src/lib/product/components/ProductSearch.jsx +++ b/src/lib/product/components/ProductSearch.jsx @@ -77,12 +77,21 @@ const ProductSearch = ({ query, prefixUrl, defaultBrand = null }) => { )} </div> - <button className='btn-light mb-6 py-2 px-5' onClick={popup.activate}> + <button + className='btn-light mb-6 py-2 px-5' + onClick={popup.activate} + > Filter </button> <div className='grid grid-cols-2 gap-3'> - {products && products.map((product) => <ProductCard product={product} key={product.id} />)} + {products && + products.map((product) => ( + <ProductCard + product={product} + key={product.id} + /> + ))} </div> <Pagination diff --git a/src/lib/product/components/ProductSlider.jsx b/src/lib/product/components/ProductSlider.jsx index 0dab2f6b..060d4638 100644 --- a/src/lib/product/components/ProductSlider.jsx +++ b/src/lib/product/components/ProductSlider.jsx @@ -42,12 +42,18 @@ const ProductSlider = ({ products, simpleTitle = false, bannerMode = false }) => > {bannerMode && ( <SwiperSlide> - <Link href={products.banner.url} className='w-full h-full block'></Link> + <Link + href={products.banner.url} + className='w-full h-full block' + ></Link> </SwiperSlide> )} {products?.products?.map((product, index) => ( <SwiperSlide key={index}> - <ProductCard product={product} simpleTitle={simpleTitle} /> + <ProductCard + product={product} + simpleTitle={simpleTitle} + /> </SwiperSlide> ))} </Swiper> |
