Skip to content

Commit

Permalink
fix: Don't show size on undeployed worlds
Browse files Browse the repository at this point in the history
  • Loading branch information
fzavalia committed Oct 4, 2023
1 parent a96c757 commit f0e733f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,15 @@ const WorldListPage: React.FC<Props> = props => {

const renderWorldSize = (ens: ENS, stats?: WorldsWalletStats) => {
const names = tab === TabType.DCL ? stats?.dclNames : stats?.ensNames
const bytes = names?.find(dclName => dclName.name === ens.subdomain)?.size

if (!isWorldDeployed(ens) || !names) {
return '-'
}

const bytes = names.find(dclName => dclName.name === ens.subdomain)?.size
const suffix = tab === TabType.ENS ? ' / 25' : ''

return !bytes ? '-' : fromBytesToMegabytes(Number(bytes)).toFixed(2) + suffix
return fromBytesToMegabytes(Number(bytes)).toFixed(2) + suffix
}

const renderList = () => {
Expand Down

0 comments on commit f0e733f

Please sign in to comment.