diff --git a/pages/wishlist.tsx b/pages/wishlist.tsx index fd28edff4..93f1c96d3 100644 --- a/pages/wishlist.tsx +++ b/pages/wishlist.tsx @@ -2,10 +2,11 @@ import type { GetStaticPropsContext } from 'next' import commerce from '@lib/api/commerce' import { Heart } from '@components/icons' import { Layout } from '@components/common' -import { Text, Container } from '@components/ui' +import { Text, Container, Skeleton } from '@components/ui' import { useCustomer } from '@framework/customer' import { WishlistCard } from '@components/wishlist' import useWishlist from '@framework/wishlist/use-wishlist' +import rangeMap from '@lib/range-map' export async function getStaticProps({ preview, @@ -43,7 +44,15 @@ export default function Wishlist() {
My Wishlist
- {isLoading || isEmpty ? ( + {isLoading ? ( +
+ {rangeMap(12, (i) => ( + +
+ + ))} +
+ ) : isEmpty ? (
@@ -56,11 +65,13 @@ export default function Wishlist() {

) : ( - data && - // @ts-ignore Shopify - Fix this types - data.items?.map((item) => ( - - )) +
+ {data && + // @ts-ignore Shopify - Fix this types + data.items?.map((item) => ( + + ))} +
)}