Skip to content

Commit 6e24ec5

Browse files
author
Melisa Anabella Rossi
authored
fix: item creation (#2908)
1 parent c020ac1 commit 6e24ec5

File tree

6 files changed

+38
-22
lines changed

6 files changed

+38
-22
lines changed

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@babylonjs/core": "^4.2.0",
77
"@babylonjs/loaders": "^4.2.0",
8-
"@dcl/builder-client": "^3.2.0",
8+
"@dcl/builder-client": "^3.3.0",
99
"@dcl/content-hash-tree": "^1.1.3",
1010
"@dcl/crypto": "^3.0.1",
1111
"@dcl/hashing": "^3.0.4",
@@ -37,7 +37,7 @@
3737
"decentraland-ecs": "^6.6.1-20201020183014.commit-bdc29ef-hotfix",
3838
"decentraland-experiments": "^1.0.2",
3939
"decentraland-transactions": "^1.47.0",
40-
"decentraland-ui": "^4.15.0",
40+
"decentraland-ui": "^4.19.0",
4141
"ethers": "^5.6.8",
4242
"file-saver": "^2.0.1",
4343
"graphql": "^15.8.0",

src/components/Modals/CreateSingleItemModal/CreateSingleItemModal.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,20 @@ export default class CreateSingleItemModal extends React.PureComponent<Props, St
199199

200200
createItem = async (sortedContents: SortedContent, representations: WearableRepresentation[]) => {
201201
const { address, collection, isHandsCategoryEnabled } = this.props
202-
const { id, name, description, type, metrics, collectionId, category, playMode, rarity, hasScreenshotTaken, requiredPermissions } = this
203-
.state as StateData
202+
const {
203+
id,
204+
name,
205+
description,
206+
type,
207+
metrics,
208+
collectionId,
209+
category,
210+
playMode,
211+
rarity,
212+
hasScreenshotTaken,
213+
requiredPermissions,
214+
tags
215+
} = this.state as StateData
204216

205217
const belongsToAThirdPartyCollection = collection?.urn && isThirdParty(collection?.urn)
206218
// If it's a third party item, we need to automatically create an URN for it by generating a random uuid different from the id
@@ -232,7 +244,7 @@ export default class CreateSingleItemModal extends React.PureComponent<Props, St
232244
data = {
233245
category: category as EmoteCategory,
234246
loop: playMode === EmotePlayMode.LOOP,
235-
tags: [],
247+
tags: tags || [],
236248
representations: [...representations]
237249
} as EmoteDataADR74
238250
}

src/components/Modals/CreateSingleItemModal/CreateSingleItemModal.types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export type StateData = {
5252
weareblePreviewUpdated: boolean
5353
video?: string
5454
requiredPermissions?: string[]
55+
tags?: string[]
5556
}
5657
export type State = {
5758
view: CreateItemView
@@ -96,6 +97,8 @@ export type AcceptedFileProps = Pick<
9697
| 'hasScreenshotTaken'
9798
| 'requiredPermissions'
9899
| 'video'
100+
| 'playMode'
101+
| 'tags'
99102
>
100103
export type OwnProps = Pick<Props, 'metadata' | 'name' | 'onClose'>
101104
export type MapStateProps = Pick<

src/components/Modals/CreateSingleItemModal/ImportStep/ImportStep.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ export default class ImportStep extends React.PureComponent<Props, State> {
265265
name: emote.name,
266266
description: emote.description,
267267
rarity: emote.rarity,
268-
category: emote.category
268+
category: emote.category,
269+
playMode: emote.play_mode,
270+
tags: emote.tags
269271
}
270272
} else {
271273
/** If the .zip file doesn't contain an asset.json file,

src/components/Modals/EmotesV2AnnouncementModal/EmotesV2AnnouncementModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ const EmotesV2AnnouncementModal: React.FC<ModalProps> = ({ name, onClose }) => {
1818

1919
const handleLearnMore = () => {
2020
handleClose()
21-
// TODO: Add documentation link
22-
window.open('https://docs.decentraland.org/', '_blank', 'noopener noreferrer')
21+
window.open('https://docs.decentraland.org/creator/emotes/props-and-sounds/', '_blank', 'noopener noreferrer')
2322
}
2423

2524
return (

0 commit comments

Comments
 (0)