Skip to content

Commit 6d97615

Browse files
committed
like filter
1 parent 2ff1eed commit 6d97615

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

frontend/src/tabs/nfts/NFTs.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,17 @@ const NFTsMainSection = (props) => {
9696
};
9797

9898
const NFTsExpandedSection = (props) => {
99-
const [currentRound, setCurrentRound] = useState(1);
99+
const round = process.env.REACT_APP_ROUND_NUMBER || 1;
100+
const [currentRound, setCurrentRound] = useState(round);
100101
const dayIndex = currentRound - 1;
101102
const imageURL = `${nftUrl}/nft/round-${currentRound}/images/`;
102103
const metadataURL = `${nftUrl}/nft/round-${currentRound}/metadata/`;
103104

104105
const handleRoundChange = (direction) => {
105-
const maxRound = 100;
106-
107106
if (direction === 'prev' && currentRound > 1) {
108107
setCurrentRound((prev) => prev - 1);
109108
props.setAllNftPagination((prev) => ({ ...prev, page: 1 }));
110-
} else if (direction === 'next' && currentRound < maxRound) {
109+
} else if (direction === 'next' && currentRound < round) {
111110
setCurrentRound((prev) => prev + 1);
112111
props.setAllNftPagination((prev) => ({ ...prev, page: 1 }));
113112
}

0 commit comments

Comments
 (0)