From 638365a35810a26f9d819a8c36ed495df77f5cbf Mon Sep 17 00:00:00 2001 From: Austin Quinn Date: Wed, 1 Feb 2023 15:25:14 -0600 Subject: [PATCH 1/2] Mobile optimization --- src/components/Leaderboard.jsx | 6 +- src/components/LeaderboardRowMore.jsx | 10 +-- src/components/LeaderboardTableHeader.jsx | 8 ++- .../LeaderboardTableHeaderSortable.jsx | 6 +- src/components/LeaderboardTableRow.jsx | 2 +- src/components/NFT.jsx | 72 +++++++++++++------ src/components/NFTs.jsx | 2 +- 7 files changed, 68 insertions(+), 38 deletions(-) diff --git a/src/components/Leaderboard.jsx b/src/components/Leaderboard.jsx index 8257d5d..5fb3f08 100644 --- a/src/components/Leaderboard.jsx +++ b/src/components/Leaderboard.jsx @@ -44,11 +44,11 @@ export default function Leaderboard() { } return ( -
-
+
+
-
+
- + - +
@@ -69,11 +69,7 @@ export default function LeaderboardRowMore({ nft, setTxHash }) { - + diff --git a/src/components/LeaderboardTableHeader.jsx b/src/components/LeaderboardTableHeader.jsx index 37f79a0..9bbc67d 100644 --- a/src/components/LeaderboardTableHeader.jsx +++ b/src/components/LeaderboardTableHeader.jsx @@ -7,11 +7,17 @@ export default function LeaderboardTableHeader({ sortBy, setSortBy }) { rank value - + Deposit Ratio Address diff --git a/src/components/LeaderboardTableHeaderSortable.jsx b/src/components/LeaderboardTableHeaderSortable.jsx index 72580f9..81077ba 100644 --- a/src/components/LeaderboardTableHeaderSortable.jsx +++ b/src/components/LeaderboardTableHeaderSortable.jsx @@ -3,15 +3,17 @@ import { CaretUpOutlined, SwapOutlined, } from "@ant-design/icons"; +import cn from "classnames"; export default function LeaderboardTableHeaderSortable({ header, sortBy, setSortBy, + extraClasses, }) { return ( - -
+ +
{header}
{nft && ( -
-
-
- +
+
+
+
+ +
+
+
+ + {nft.isActive && ( +
+ +
+ )}
-
- - {nft.isActive && ( -
- +
+ +
+ +
+
- )} +
-
@@ -192,12 +206,12 @@ export default function NFT({ tokenId }) { />
-
+
-
+
{round((nft.deposit + nft.withdrawn) / 10 ** 18, 2)}
+ {isClaimable && nft.isActive && ( +
+ +
+ )}
{isClaimable && nft.isActive && ( -
+
- {isClaimable && nft.isActive && ( -
- -
- )}
{isClaimable && nft.isActive && ( -
+