Skip to content

Commit 7745fb4

Browse files
committed
rename AssetType
1 parent 2da3140 commit 7745fb4

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

packages/@dcl/inspector/src/components/ImportAsset/Slider/Slider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function Slider({ assets, onSubmit, isNameValid }: PropTypes) {
6565
const allScreenshotsTaken = useMemo(() => {
6666
const neededScreenshots = value.filter(($) => {
6767
const type = determineAssetType($.extension)
68-
return type === '3D Model' || type === 'Image'
68+
return type === 'Models' || type === 'Images'
6969
})
7070
return neededScreenshots.length === Object.keys(screenshots).length
7171
}, [value, screenshots])

packages/@dcl/inspector/src/components/ImportAsset/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type ValidationError =
2121
}
2222
| undefined
2323

24-
export type AssetType = '3D Model' | 'Image' | 'Audio' | 'Video' | 'Other'
24+
export type AssetType = 'Models' | 'Images' | 'Audio' | 'Video' | 'Other'
2525

2626
export const isModelAsset = (asset: Asset): asset is ModelAsset => {
2727
const _asset = asset as any

packages/@dcl/inspector/src/components/ImportAsset/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ export function determineAssetType(extension: string): AssetType {
299299
switch (extension) {
300300
case 'gltf':
301301
case 'glb':
302-
return '3D Model'
302+
return 'Models'
303303
case 'png':
304304
case 'jpg':
305305
case 'jpeg':
306-
return 'Image'
306+
return 'Images'
307307
case 'mp3':
308308
case 'wav':
309309
case 'ogg':

packages/@dcl/inspector/src/components/ProjectAssetExplorer/ProjectView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ function NodeIcon({ value }: { value?: TreeNode }) {
284284
const Icon = useMemo(() => {
285285
const classification = determineAssetType(extractFileExtension(value.name)[1])
286286
switch (classification) {
287-
case '3D Model':
287+
case 'Models':
288288
return ModelIcon
289-
case 'Image':
289+
case 'Images':
290290
return ImageIcon
291291
case 'Audio':
292292
return AudioIcon

packages/@dcl/inspector/src/components/ProjectAssetExplorer/Tile/Tile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export const Tile = withContextMenu<Props>(
4343
if (thumbnail) return <img src={transformBinaryToBase64Resource(thumbnail)} alt={value.name} />
4444
const classification = determineAssetType(extractFileExtension(value.name)[1])
4545
switch (classification) {
46-
case '3D Model':
46+
case 'Models':
4747
return <ModelIcon />
48-
case 'Image':
48+
case 'Images':
4949
return <ImageIcon />
5050
case 'Audio':
5151
return <AudioIcon />

0 commit comments

Comments
 (0)