diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-03-27 11:28:58 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-03-27 11:28:58 +0700 |
| commit | e77ab00b04426f85d04d211f5ab4a511e754ed4f (patch) | |
| tree | 191721d87e780df07dabf06fb0136fa9d6de0b68 /src/lib/wishlist | |
| parent | 8876e48c35f41b77e61ba90bd95ab4c993d67e9e (diff) | |
| parent | bc04e721d51e149709ab3cfaf5e77ef034511860 (diff) | |
Merge branch 'master' of https://bitbucket.org/altafixco/next-indoteknik
Diffstat (limited to 'src/lib/wishlist')
| -rw-r--r-- | src/lib/wishlist/components/Wishlists.jsx | 68 |
1 files changed, 42 insertions, 26 deletions
diff --git a/src/lib/wishlist/components/Wishlists.jsx b/src/lib/wishlist/components/Wishlists.jsx index e61efcc3..e13c61e5 100644 --- a/src/lib/wishlist/components/Wishlists.jsx +++ b/src/lib/wishlist/components/Wishlists.jsx @@ -4,6 +4,9 @@ import Spinner from '@/core/components/elements/Spinner/Spinner' import ProductCard from '@/lib/product/components/ProductCard' import { useRouter } from 'next/router' import useWishlists from '../hooks/useWishlists' +import MobileView from '@/core/components/views/MobileView' +import DesktopView from '@/core/components/views/DesktopView' +import Menu from '@/lib/auth/components/Menu' const Wishlists = () => { const router = useRouter() @@ -22,33 +25,46 @@ const Wishlists = () => { } return ( - <div className='px-4 py-6'> - {wishlists.data?.products?.length == 0 && ( - <Alert - type='info' - className='text-center' - > - Wishlist anda masih kosong - </Alert> - )} - - <div className='grid grid-cols-2 gap-3'> - {wishlists.data?.products.map((product) => ( - <ProductCard - key={product.id} - product={product} - /> - ))} - </div> + <> + <MobileView> + <div className='px-4 py-6'> + {wishlists.data?.products?.length == 0 && ( + <Alert type='info' className='text-center'> + Wishlist anda masih kosong + </Alert> + )} - <div className='mt-6'> - <Pagination - currentPage={page} - pageCount={pageCount} - url={`/my/wishlist`} - /> - </div> - </div> + <div className='grid grid-cols-2 gap-3'> + {wishlists.data?.products.map((product) => ( + <ProductCard key={product.id} product={product} /> + ))} + </div> + + <div className='mt-6'> + <Pagination currentPage={page} pageCount={pageCount} url={`/my/wishlist`} /> + </div> + </div> + </MobileView> + + <DesktopView> + <div className='container mx-auto flex py-10'> + <div className='w-3/12 pr-4'> + <Menu /> + </div> + <div className='w-9/12'> + <div className='grid grid-cols-5 gap-3'> + {wishlists.data?.products.map((product) => ( + <ProductCard key={product.id} product={product} /> + ))} + </div> + + <div className='mt-6'> + <Pagination currentPage={page} pageCount={pageCount} url={`/my/wishlist`} /> + </div> + </div> + </div> + </DesktopView> + </> ) } |
