From 802f712b4c890df90ae5f879fd7fb0b04de88842 Mon Sep 17 00:00:00 2001 From: Benedek Robert George Date: Tue, 13 Feb 2024 12:36:19 +0200 Subject: [PATCH 1/2] fix: make visible all the tablist items --- src/components/CustomPagination.tsx | 2 +- .../DataNFT/DataNFTMarketplaceMultiversX.tsx | 42 ++++++++++++------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/components/CustomPagination.tsx b/src/components/CustomPagination.tsx index ccbefbf7..4cb4430e 100644 --- a/src/components/CustomPagination.tsx +++ b/src/components/CustomPagination.tsx @@ -25,7 +25,7 @@ export const CustomPagination: FC = ({ pageCount, pageIndex, gotoPage }; return ( - + = ({ tabState }) => { - - + + = ({ tabState }) => { - - {!window.location.href.includes("my") && ( - setShowGroupedDataNfts(!showGroupedDataNfts)} colorScheme={"teal"}> - - - Show all offers - - - - - - - )} + + + {!window.location.href.includes("my") && ( + setShowGroupedDataNfts(!showGroupedDataNfts)} colorScheme={"teal"}> + + + Show all offers + + + + + + + )} + { Date: Tue, 13 Feb 2024 15:48:21 +0200 Subject: [PATCH 2/2] fix: favorite card for mobile display tablist wallet #1175 --- src/components/CustomPagination.tsx | 2 +- src/pages/DataNFT/DataNFTMarketplaceMultiversX.tsx | 9 ++++----- src/pages/DataNFT/DataNftCollection.tsx | 8 ++++---- src/pages/DataNFT/MyDataNFTsMultiversX.tsx | 12 ++++++++++-- src/pages/DataNFT/components/FavoriteCards.tsx | 9 +++++---- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/components/CustomPagination.tsx b/src/components/CustomPagination.tsx index 4cb4430e..713b8eea 100644 --- a/src/components/CustomPagination.tsx +++ b/src/components/CustomPagination.tsx @@ -62,7 +62,7 @@ export const CustomPagination: FC = ({ pageCount, pageIndex, gotoPage - + Page{" "} diff --git a/src/pages/DataNFT/DataNFTMarketplaceMultiversX.tsx b/src/pages/DataNFT/DataNFTMarketplaceMultiversX.tsx index c2d042f2..ddcca85a 100644 --- a/src/pages/DataNFT/DataNFTMarketplaceMultiversX.tsx +++ b/src/pages/DataNFT/DataNFTMarketplaceMultiversX.tsx @@ -50,7 +50,7 @@ import { DataNftCollectionType, DataNftMetadataType, OfferType } from "libs/Mult import { convertWeiToEsdt, createNftId, hexZero, sleep, tokenDecimals } from "libs/utils"; import DataNFTDetails from "pages/DataNFT/DataNFTDetails"; import { useMarketStore } from "store"; -import { DataNftCollection } from "./DataNftCollection"; +import { DataNftCollectionCard } from "./DataNftCollection"; interface PropsType { tabState: number; // 1 for "Public Marketplace", 2 for "My Data NFTs" @@ -324,7 +324,7 @@ export const Marketplace: FC = ({ tabState }) => { if (hasPendingTransactions) return; navigate("/datanfts/marketplace/market"); }}> - + = ({ tabState }) => { navigate("/datanfts/marketplace/my"); }}> {isMxLoggedIn && ( - + = ({ tabState }) => { @@ -439,7 +438,7 @@ export const Marketplace: FC = ({ tabState }) => { )) : Array.from(groupedOffers.entries()).map(([nonce, offer], index) => { return ( - = ({ +export const DataNftCollectionCard: FC = ({ index, nftImageLoading, imageUrl, @@ -38,6 +38,7 @@ export const DataNftCollection: FC = ({ const { chainID } = useGetNetworkConfig(); const { loginMethod } = useGetLoginInfo(); const { colorMode } = useColorMode(); + return ( = ({ padding={"32px"}> - + {title} @@ -79,7 +80,6 @@ export const DataNftCollection: FC = ({ /> - Total supply: {supply} diff --git a/src/pages/DataNFT/MyDataNFTsMultiversX.tsx b/src/pages/DataNFT/MyDataNFTsMultiversX.tsx index aed8acc5..2acda9bd 100644 --- a/src/pages/DataNFT/MyDataNFTsMultiversX.tsx +++ b/src/pages/DataNFT/MyDataNFTsMultiversX.tsx @@ -182,8 +182,16 @@ export default function MyDataNFTsMx({ tabState }: { tabState: number }) { isDisabled={tab.isDisabled} p={{ base: "0", md: "initial" }} _selected={{ borderBottom: "5px solid", borderBottomColor: "teal.200" }} - onClick={() => onChangeTab(index + 1)}> - + onClick={() => onChangeTab(index + 1)} + mx={"auto"}> + {tab.tabName} diff --git a/src/pages/DataNFT/components/FavoriteCards.tsx b/src/pages/DataNFT/components/FavoriteCards.tsx index e801eca2..07eb27e6 100644 --- a/src/pages/DataNFT/components/FavoriteCards.tsx +++ b/src/pages/DataNFT/components/FavoriteCards.tsx @@ -20,7 +20,7 @@ export const FavoriteCards: React.FC = () => { const [favouriteItems, setFavouriteItems] = React.useState>([]); const [dataNfts, setDataNfts] = React.useState>([]); - const skeletonHeight = { base: "260px", md: "190px", "2xl": "220px" }; + const skeletonHeight = { base: "160px", md: "190px", "2xl": "220px" }; useEffect(() => { (async () => { @@ -62,7 +62,7 @@ export const FavoriteCards: React.FC = () => { // console.log(dataNfts); return ( - + {favouriteItems.length === 0 ? ( ) : ( @@ -75,11 +75,12 @@ export const FavoriteCards: React.FC = () => { backgroundColor="none" border=".01rem solid transparent" borderColor="#00C79740" - borderRadius="0.75rem"> + borderRadius="0.75rem" + width={{ base: "250px", md: "300px" }}> - Data NFT Image + Data NFT Image