Skip to content
This repository was archived by the owner on Aug 1, 2022. It is now read-only.

Commit 822db5b

Browse files
committed
Don't show featured collections to users without tokens.
1 parent 39a29b6 commit 822db5b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/react-hooks/src/useCollections.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ import type { TokenDetailsInterface } from '@polkadot/react-hooks/useToken';
88
import BN from 'bn.js';
99
import { useCallback, useState } from 'react';
1010

11-
import envConfig from '@polkadot/apps-config/envConfig';
1211
import { useApi, useCollection, useIsMountedRef /*, useFetch */ } from '@polkadot/react-hooks';
1312

14-
const { uniqueCollectionIds } = envConfig;
15-
1613
export type MetadataType = {
1714
metadata?: string;
1815
}
@@ -90,7 +87,7 @@ export function useCollections () {
9087
try {
9188
const collections: Array<NftCollectionInterface> = []; // JSON.parse(localStorage.getItem('tokenCollections') || '[]') as NftCollectionInterface[];
9289

93-
const collectionIdsList = (collectionIds?.length ? collectionIds.map((item) => item.toString()) : uniqueCollectionIds);
90+
const collectionIdsList = (collectionIds?.length ? collectionIds.map((item) => item.toString()) : []);
9491

9592
for (let i = 0; i < collectionIdsList.length; i++) {
9693
const mintCollectionInfo = await getDetailedCollectionInfo(collectionIdsList[i]) as unknown as NftCollectionInterface;

0 commit comments

Comments
 (0)