Skip to content

Commit

Permalink
chore: Only hide items when price is 0 (decentraland#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzavalia authored Mar 31, 2022
1 parent 164d614 commit 68645ec
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions webapp/src/components/BuyPage/BuyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,13 @@ const BuyPage = (props: Props) => {
{wallet => (
<AssetProviderPage type={type}>
{(asset, order) => {
// Don't display the page if the cost of the item/nft is 0
switch (type) {
case AssetType.NFT:
if (order?.price === '0') {
return <NotFound />
}
// Don't display the page if the cost of the item is 0
if (type === AssetType.ITEM) {
const { price } = asset as Item

break

case AssetType.ITEM:
const { price } = asset as Item

if (price === '0') {
return <NotFound />
}
if (price === '0') {
return <NotFound />
}
}

const modalProps = {
Expand Down

0 comments on commit 68645ec

Please sign in to comment.