diff --git a/components/common/listingCart/ListingCartItem.vue b/components/common/listingCart/ListingCartItem.vue new file mode 100644 index 0000000000..7d58f08b94 --- /dev/null +++ b/components/common/listingCart/ListingCartItem.vue @@ -0,0 +1,89 @@ + + + + diff --git a/components/common/listingCart/ListingCartMini.vue b/components/common/listingCart/ListingCartMini.vue new file mode 100644 index 0000000000..55b5226f25 --- /dev/null +++ b/components/common/listingCart/ListingCartMini.vue @@ -0,0 +1,51 @@ + + + diff --git a/components/common/listingCart/ListingCartModal.vue b/components/common/listingCart/ListingCartModal.vue new file mode 100644 index 0000000000..584e53b2c4 --- /dev/null +++ b/components/common/listingCart/ListingCartModal.vue @@ -0,0 +1,215 @@ + + + diff --git a/components/common/listingCart/ListingCartPriceInput.vue b/components/common/listingCart/ListingCartPriceInput.vue new file mode 100644 index 0000000000..acc5d210b4 --- /dev/null +++ b/components/common/listingCart/ListingCartPriceInput.vue @@ -0,0 +1,64 @@ + + + + diff --git a/components/common/shoppingCart/utils.ts b/components/common/shoppingCart/utils.ts index e5972999f3..c5dfdfcc6e 100644 --- a/components/common/shoppingCart/utils.ts +++ b/components/common/shoppingCart/utils.ts @@ -1,4 +1,5 @@ import { calculateExactUsdFromToken } from '@/utils/calculation' +import { ListCartItem } from '@/stores/listingCart' import { ShoppingCartItem } from './types' import { useFiatStore } from '@/stores/fiat' import { sum } from '@/utils/math' @@ -62,3 +63,21 @@ export const nftToShoppingCardItem = (nft: NFT): ShoppingCartItem => { meta: nft.meta, } } + +export const nftToListingCartItem = (nft: NFT, floor = ''): ListCartItem => { + const { urlPrefix } = usePrefix() + + return { + id: nft.id, + name: nft.name, + price: nft.price ?? '0', + urlPrefix: urlPrefix.value, + collection: { + ...nft.collection, + floor, + }, + listPrice: null, + metadata: nft.metadata, + meta: nft.meta, + } +} diff --git a/components/items/ItemsGrid/ItemsGrid.vue b/components/items/ItemsGrid/ItemsGrid.vue index 02709f6305..2b117aa6f4 100644 --- a/components/items/ItemsGrid/ItemsGrid.vue +++ b/components/items/ItemsGrid/ItemsGrid.vue @@ -36,7 +36,6 @@ (slotProps.isMobileVariant || slotProps.grid === 'small') && 'minimal' " /> - @@ -45,6 +44,8 @@