Skip to content

Commit

Permalink
fix: add missing tag in emote detail (decentraland#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Sep 20, 2023
1 parent 28223bd commit 7af0270
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 30 deletions.
72 changes: 48 additions & 24 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"dcl-catalyst-client": "^21.2.0",
"dcl-catalyst-commons": "^9.0.1",
"decentraland-crypto-fetch": "^1.0.3",
"decentraland-dapps": "^16.8.1",
"decentraland-dapps": "^16.10.0",
"decentraland-transactions": "^1.47.0",
"decentraland-ui": "^4.12.0",
"decentraland-ui": "^4.15.0",
"dotenv": "^10.0.0",
"ethers": "^5.6.8",
"graphql": "^14.7.0",
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/components/AssetImage/AssetImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ const AssetImage = (props: Props) => {
asset.category === NFTCategory.EMOTE &&
wearableController &&
isDraggable &&
hasSound === undefined
!isLoadingWearablePreview
) {
wearableController.emote?.hasSound().then(sound => {
setHasSound(sound)
})
}
}, [wearableController, asset.category, isDraggable, hasSound])
}, [wearableController, asset.category, isDraggable, hasSound, isLoadingWearablePreview])

const estateSelection = useMemo(() => (estate ? getSelection(estate) : []), [
estate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

.EmoteDetail .badges {
margin-top: 8px;
margin-bottom: 15px;
display: flex;
gap: 8px;
flex-wrap: wrap;
Expand Down
26 changes: 26 additions & 0 deletions webapp/src/components/AssetPage/EmoteDetail/EmoteDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ const EmoteDetail = ({ nft }: Props) => {
[loop]
)

const emoteSoundHref = locations.browse({
assetType: AssetType.ITEM,
section: Section.EMOTES,
emoteHasSound: true
})

const emoteGeometryHref = locations.browse({
assetType: AssetType.ITEM,
section: Section.EMOTES,
emoteHasGeometry: true
})

return (
<div className={styles.EmoteDetail}>
<OnBack asset={nft} />
Expand All @@ -89,6 +101,20 @@ const EmoteDetail = ({ nft }: Props) => {
href={emoteBadgeHref}
/>
<CampaignBadge contract={nft.contractAddress} />
{emote.hasSound && (
<IconBadge
icon="sound"
text={t('emote.sound')}
href={emoteSoundHref}
/>
)}
{emote.hasGeometry && (
<IconBadge
icon="props"
text={t('emote.props')}
href={emoteGeometryHref}
/>
)}
</div>
</div>
<Description text={emote.description} />
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/modules/translation/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
"gender": "Gender",
"smart_wearables": "Smart Wearables",
"emote_attributes": {
"title": "Emote attributes",
"title": "Emote features",
"play_mode": "Play Mode",
"all_play_modes": "All Play Modes",
"all_items": "All emotes",
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/modules/translation/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
"gender": "Género",
"smart_wearables": "Vestimentas Interactivas",
"emote_attributes": {
"title": "Emote attributes",
"title": "Atributos de Emotes",
"play_mode": "Modo de reproducción",
"all_play_modes": "Todos",
"all_items": "Todos los emotes",
Expand Down

0 comments on commit 7af0270

Please sign in to comment.