File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -96,18 +96,17 @@ const NFTsMainSection = (props) => {
96
96
} ;
97
97
98
98
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 ) ;
100
101
const dayIndex = currentRound - 1 ;
101
102
const imageURL = `${ nftUrl } /nft/round-${ currentRound } /images/` ;
102
103
const metadataURL = `${ nftUrl } /nft/round-${ currentRound } /metadata/` ;
103
104
104
105
const handleRoundChange = ( direction ) => {
105
- const maxRound = 100 ;
106
-
107
106
if ( direction === 'prev' && currentRound > 1 ) {
108
107
setCurrentRound ( ( prev ) => prev - 1 ) ;
109
108
props . setAllNftPagination ( ( prev ) => ( { ...prev , page : 1 } ) ) ;
110
- } else if ( direction === 'next' && currentRound < maxRound ) {
109
+ } else if ( direction === 'next' && currentRound < round ) {
111
110
setCurrentRound ( ( prev ) => prev + 1 ) ;
112
111
props . setAllNftPagination ( ( prev ) => ( { ...prev , page : 1 } ) ) ;
113
112
}
You can’t perform that action at this time.
0 commit comments