• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / marketplace / 8249081468

12 Mar 2024 12:48PM UTC coverage: 66.114% (-0.02%) from 66.13%
8249081468

Pull #2181

github

LautaroPetaccio
fix: No unused vars & correct linting script in CI
Pull Request #2181: fix: Linting rules one (no-empty, no-yield, no-case-declarations and no-unused-vars)

2509 of 4914 branches covered (51.06%)

Branch coverage included in aggregate %.

3 of 5 new or added lines in 4 files covered. (60.0%)

1 existing line in 1 file now uncovered.

7428 of 10116 relevant lines covered (73.43%)

72.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

39.13
/webapp/src/components/OnSaleOrRentList/AssetCell/AssetCell.tsx
1
import React from 'react'
1✔
2
import { Link } from 'react-router-dom'
1✔
3
import { NFTCategory } from '@dcl/schemas'
1✔
4
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
1✔
5
import { locations } from '../../../modules/routing/locations'
1✔
6
import { AssetImage } from '../../AssetImage'
1✔
7
import { Props } from './AssetCell.types'
8
import styles from './AssetCell.module.css'
1✔
9

10
const AssetCell = ({ asset, link: linkProp }: Props) => {
1✔
11
  let subtitle: string | undefined
12

13
  switch (asset.category) {
×
14
    case NFTCategory.ESTATE: {
15
      subtitle = t('global.parcel_count', {
×
16
        count: asset.data.estate!.parcels.length
17
      })
18
      break
×
19
    }
20
    case NFTCategory.PARCEL: {
21
      const { x, y } = asset.data.parcel!
×
22
      subtitle = `${x},${y}`
×
NEW
23
      break
×
24
    }
25
  }
26

27
  const link = linkProp
×
28
    ? linkProp
29
    : 'tokenId' in asset
×
30
      ? locations.nft(asset.contractAddress, asset.tokenId)
31
      : locations.item(asset.contractAddress, asset.itemId)
32

33
  return (
34
    <Link to={link}>
35
      <div className={styles.firstCell}>
36
        <div className={styles.imageContainer}>
37
          <AssetImage asset={asset} isSmall />
38
        </div>
39
        <div>
40
          <div className={styles.title}>{asset.name}</div>
41
          {subtitle && <div className={styles.subtitle}>{subtitle}</div>}
×
42
        </div>
43
      </div>
44
    </Link>
45
  )
46
}
47

48
export default React.memo(AssetCell)
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc