From 34873f521ecfd72d3cb083a3138c56272abda88b Mon Sep 17 00:00:00 2001
From: Florencia Barreto <32873485+flobarreto@users.noreply.github.com>
Date: Mon, 27 Mar 2023 10:31:44 -0300
Subject: [PATCH] Feat: item detail information (#1487)
* feat: created owners table with corresponding styles
* feat: added connection with nft server
* feat: added sort by
* feat: some fixes
* feat: removed unused container
* fix: pr comments
* fix: imports
* fix: pr commentsg
* fix: removed change con dev.json
* fix: pr comments
* fix: changed component name
* feat: create listings table component
* feat: listings table with mocked data
* fix: dates and sytles
* feat: connected with api
* feat: added empty state to tables - missing listings empty state
* feat: added empty state text
* fix: added name as possible filter to support marketplace subraph
* fix: test
* feat: updated dcl shcemas
* feat: created mint or buy component
* fix: pr comments
* feat: item detail page
* fix: some styles
* Feat/latest sales table (#1488)
* feat: redesign lastest sales table
* fix: table title
* fix: removed unused file
* fix: pr comments
* fix: typo
---
.../BestBuyingOption.module.css | 8 +-
.../ItemDetail/ItemDetail.module.css | 62 +++++++++
.../AssetPage/ItemDetail/ItemDetail.tsx | 129 +++++++++---------
.../ListingsTable/ListingsTable.module.css | 5 +
.../AssetPage/ListingsTable/ListingsTable.tsx | 19 ++-
.../ListingsTableContainer.module.css | 6 +-
.../TransactionHistory/TransactionHistory.css | 28 ++++
.../TransactionHistory/TransactionHistory.tsx | 16 ++-
8 files changed, 192 insertions(+), 81 deletions(-)
create mode 100644 webapp/src/components/AssetPage/ItemDetail/ItemDetail.module.css
diff --git a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.module.css b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.module.css
index 6625afbeb..0a574a6e0 100644
--- a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.module.css
+++ b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.module.css
@@ -3,9 +3,7 @@
border-radius: 12px;
display: flex;
padding: 24px;
- /* TODO: when placing this on the correct place, make it's width on percentage to be responsive */
- width: 668px;
- margin-top: 50px;
+ width: 100%;
}
.BestBuyingOption .cardTitle {
@@ -58,3 +56,7 @@
.BestBuyingOption :global(.ui.header.medium) {
font-size: 17px;
}
+
+.BestBuyingOption :global(.ui.button + .ui.button) {
+ margin-left: unset;
+}
diff --git a/webapp/src/components/AssetPage/ItemDetail/ItemDetail.module.css b/webapp/src/components/AssetPage/ItemDetail/ItemDetail.module.css
new file mode 100644
index 000000000..d261456cd
--- /dev/null
+++ b/webapp/src/components/AssetPage/ItemDetail/ItemDetail.module.css
@@ -0,0 +1,62 @@
+.ItemDetail {
+ display: flex;
+ flex-direction: column;
+}
+
+.ItemDetail .assetImageContainer :global(.AssetImage) {
+ border-radius: 12px;
+ overflow: hidden;
+}
+
+.ItemDetail .assetImageContainer {
+ width: 48%;
+}
+
+.ItemDetail .badges {
+ margin-top: 15px;
+ display: flex;
+ gap: 8px;
+ flex-wrap: wrap;
+}
+
+.ItemDetail .information {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ width: 48%;
+ gap: 30px;
+}
+
+.ItemDetail .informationContainer {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ gap: 30px;
+}
+
+.ItemDetail .basicRow {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ width: 100%;
+}
+
+.ItemDetail :global(.ui.button + .ui.button) {
+ margin-left: 0px;
+}
+
+@media (max-width: 800px) {
+ .ItemDetail .information {
+ width: 100%;
+ }
+ .ItemDetail .assetImageContainer {
+ width: 100%;
+ }
+ .ItemDetail .basicRow {
+ flex-direction: column;
+ }
+
+ .ItemDetail :global(.dcl.stats + .dcl.stats) {
+ width: 100%;
+ }
+}
diff --git a/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx b/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx
index ba5c179e0..f855cc5f4 100644
--- a/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx
+++ b/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx
@@ -1,6 +1,7 @@
import React, { useMemo, useRef } from 'react'
-import { t } from 'decentraland-dapps/dist/modules/translation/utils'
+import { Container } from 'decentraland-ui'
import { BodyShape, EmotePlayMode, NFTCategory } from '@dcl/schemas'
+import { t } from 'decentraland-dapps/dist/modules/translation/utils'
import { locations } from '../../../modules/routing/locations'
import { Section } from '../../../modules/vendor/decentraland'
import RarityBadge from '../../RarityBadge'
@@ -13,13 +14,13 @@ import SmartBadge from '../SmartBadge'
import { Description } from '../Description'
import { Owner } from '../Owner'
import Collection from '../Collection'
-import BaseDetail from '../BaseDetail'
import IconBadge from '../IconBadge'
import { TransactionHistory } from '../TransactionHistory'
-import { SaleActionBox } from '../SaleActionBox'
import ListingsTableContainer from '../ListingsTableContainer/ListingsTableContainer'
-import { Props } from './ItemDetail.types'
import { BestBuyingOption } from '../BestBuyingOption'
+import Title from '../Title'
+import { Props } from './ItemDetail.types'
+import styles from './ItemDetail.module.css'
const ItemDetail = ({ item }: Props) => {
let description = ''
@@ -54,73 +55,71 @@ const ItemDetail = ({ item }: Props) => {
)
return (
-