kodadot/nft-gallery

View on GitHub
components/landing/topCollections/utils/useTopCollections.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Function useTopCollections has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const useTopCollections = (limit: number, immediate = true) => {
  const { client, urlPrefix } = usePrefix()
  const { isAssetHub, isBase } = useIsChain(urlPrefix)
  const topCollectionWithVolumeList = useState<CollectionEntityWithVolumes[]>(
    'topCollectionWithVolumeList',
Severity: Major
Found in components/landing/topCollections/utils/useTopCollections.ts - About 2 hrs to fix

    Function proccessData has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const proccessData = (
      collectionsList: CollectionEntity[],
      collectionsSales: CollectionSales[],
    ) => {
      return Promise.all(
    Severity: Minor
    Found in components/landing/topCollections/utils/useTopCollections.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status