diff --git a/rair-front/src/components/MockUpPage/NftList/NftData/NftCollectionPage.tsx b/rair-front/src/components/MockUpPage/NftList/NftData/NftCollectionPage.tsx index 8644f28b..c85a3f60 100644 --- a/rair-front/src/components/MockUpPage/NftList/NftData/NftCollectionPage.tsx +++ b/rair-front/src/components/MockUpPage/NftList/NftData/NftCollectionPage.tsx @@ -70,7 +70,8 @@ const NftCollectionPageComponent: FC = ({ currentCollection, currentCollectionTotal, currentCollectionStatus, - currentCollectionMetadata + currentCollectionMetadata, + currentCollectionNextPageStatus } = useAppSelector((store) => store.tokens); const { width } = useWindowDimensions(); @@ -781,7 +782,7 @@ const NftCollectionPageComponent: FC = ({ )} - {isLoading && ( + {currentCollectionNextPageStatus && (
{ + state.currentCollectionNextPageStatus = true; + }) + .addCase( loadNextCollectionPage.fulfilled, (state, action: PayloadAction) => { @@ -368,10 +375,15 @@ export const tokenSlice = createSlice({ state.currentCollection[token.uniqueIndexInContract.toString()] = token; }); + state.currentCollectionNextPageStatus = false; } } ) + .addCase(loadNextCollectionPage.rejected, (state) => { + state.currentCollectionNextPageStatus = false; + }) + // Load metadata for collection .addCase(loadCollectionMetadata.pending, (state) => { state.currentCollectionMetadataStatus = dataStatuses.Loading;