diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-21 22:33:32 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-21 22:33:32 +0700 |
| commit | 98c8fc56db91664b98a50e9113787b56fe785b9e (patch) | |
| tree | bbef2bce15561ee7c44501916d03fd2f6c24cbb8 /src/lib/wishlist/components | |
| parent | 706088ffe9e13221207837bb658887645e76b3ed (diff) | |
fix
Diffstat (limited to 'src/lib/wishlist/components')
| -rw-r--r-- | src/lib/wishlist/components/Wishlists.jsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/wishlist/components/Wishlists.jsx b/src/lib/wishlist/components/Wishlists.jsx index 8a456a8d..4bb63933 100644 --- a/src/lib/wishlist/components/Wishlists.jsx +++ b/src/lib/wishlist/components/Wishlists.jsx @@ -15,16 +15,22 @@ const Wishlists = () => { const pageCount = Math.ceil(wishlists.data?.productTotal / limit) + if (wishlists.isLoading) { + return ( + <div className="flex justify-center my-6"> + <Spinner className="w-6 text-gray_r-12/50 fill-gray_r-12" /> + </div> + ) + } + return ( <div className="px-4 py-6"> - { wishlists.isLoading && ( - <Spinner className="w-6 h-6 text-gray-600 fill-gray-900 mx-auto" /> - ) } { 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} data={product} /> |
