diff --git a/packages/@dcl/inspector/src/components/Assets/Assets.css b/packages/@dcl/inspector/src/components/Assets/Assets.css index 55143dda3..054cdf91c 100644 --- a/packages/@dcl/inspector/src/components/Assets/Assets.css +++ b/packages/@dcl/inspector/src/components/Assets/Assets.css @@ -70,10 +70,14 @@ margin-left: 8px; display: flex; align-items: center; + padding: 8px 9px; + font-weight: 600; + border-radius: 6px; } .Assets .Assets-buttons > button:first-child svg { margin-right: 5px; + stroke-width: 3; } .Assets .Assets-content { diff --git a/packages/@dcl/inspector/src/components/FileInput/FileInput.tsx b/packages/@dcl/inspector/src/components/FileInput/FileInput.tsx index 30b98b267..1ff917628 100644 --- a/packages/@dcl/inspector/src/components/FileInput/FileInput.tsx +++ b/packages/@dcl/inspector/src/components/FileInput/FileInput.tsx @@ -44,6 +44,8 @@ export const FileInput = React.forwardRef): void => { const files = Array.from(e.target.files ?? []) onDrop && onDrop(files) + // Reset the input value so the same file can be selected again + e.target.value = '' }, [onDrop] ) diff --git a/packages/@dcl/inspector/src/components/ImportAsset/Error/Error.tsx b/packages/@dcl/inspector/src/components/ImportAsset/Error/Error.tsx index a2ad20337..2d759eb04 100644 --- a/packages/@dcl/inspector/src/components/ImportAsset/Error/Error.tsx +++ b/packages/@dcl/inspector/src/components/ImportAsset/Error/Error.tsx @@ -11,9 +11,7 @@ import { ValidationError } from '../types' export function Error({ assets, onSubmit }: PropTypes) { const getErrorMessage = useCallback((error: ValidationError): string => { - if (!error) return 'Unknown error' - - switch (error.type) { + switch (error?.type) { case 'type': return 'File type not supported' case 'model': @@ -30,9 +28,7 @@ export function Error({ assets, onSubmit }: PropTypes) {

Asset failed to import

- {assets.map(($, i) => ( - - ))} + {assets.map(($, i) => $.error && )}