forked from crowetic/commerce
check
This commit is contained in:
parent
58067808d7
commit
c5cb9bda34
@ -4,7 +4,7 @@ import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-a
|
|||||||
import useWishlist from '@bigcommerce/storefront-data-hooks/wishlist/use-wishlist'
|
import useWishlist from '@bigcommerce/storefront-data-hooks/wishlist/use-wishlist'
|
||||||
import { Layout } from '@components/common'
|
import { Layout } from '@components/common'
|
||||||
import { Heart } from '@components/icons'
|
import { Heart } from '@components/icons'
|
||||||
import { Text } from '@components/ui'
|
import { Text, Container } from '@components/ui'
|
||||||
import { WishlistCard } from '@components/wishlist'
|
import { WishlistCard } from '@components/wishlist'
|
||||||
import { defatultPageProps } from '@lib/defaults'
|
import { defatultPageProps } from '@lib/defaults'
|
||||||
|
|
||||||
@ -23,27 +23,31 @@ export default function Wishlist() {
|
|||||||
const { data, isEmpty } = useWishlist({ includeProducts: true })
|
const { data, isEmpty } = useWishlist({ includeProducts: true })
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-3 mb-20 px-6">
|
<Container>
|
||||||
<Text variant="pageHeading">My Wishlist</Text>
|
<div className="mt-3 mb-20">
|
||||||
<div className="group flex flex-col">
|
<Text variant="pageHeading">My Wishlist</Text>
|
||||||
{isEmpty ? (
|
<div className="group flex flex-col">
|
||||||
<div className="flex-1 px-12 py-24 flex flex-col justify-center items-center ">
|
{isEmpty ? (
|
||||||
<span className="border border-dashed border-secondary rounded-full flex items-center justify-center w-16 h-16 bg-primary p-12 rounded-lg text-primary">
|
<div className="flex-1 px-12 py-24 flex flex-col justify-center items-center ">
|
||||||
<Heart className="absolute" />
|
<span className="border border-dashed border-secondary flex items-center justify-center w-16 h-16 bg-primary p-12 rounded-lg text-primary">
|
||||||
</span>
|
<Heart className="absolute" />
|
||||||
<h2 className="pt-6 text-2xl font-bold tracking-wide text-center">
|
</span>
|
||||||
Your wishlist is empty
|
<h2 className="pt-6 text-2xl font-bold tracking-wide text-center">
|
||||||
</h2>
|
Your wishlist is empty
|
||||||
<p className="text-accents-6 px-10 text-center pt-2">
|
</h2>
|
||||||
Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake.
|
<p className="text-accents-6 px-10 text-center pt-2">
|
||||||
</p>
|
Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake.
|
||||||
</div>
|
</p>
|
||||||
) : (
|
</div>
|
||||||
data &&
|
) : (
|
||||||
data.items?.map((item) => <WishlistCard key={item.id} item={item} />)
|
data &&
|
||||||
)}
|
data.items?.map((item) => (
|
||||||
|
<WishlistCard key={item.id} item={item} />
|
||||||
|
))
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user