Skip to content

Commit 0d4756f

Browse files
committed
databox - skeleton thumbnail
1 parent 6f0a0b7 commit 0d4756f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

databox/client/src/components/Media/Asset/AssetThumb.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ import {Asset} from '../../../types';
33
import AssetFileIcon from './AssetFileIcon';
44
import assetClasses from '../../AssetList/classes';
55
import FilePlayer from './FilePlayer';
6-
import {CircularProgress, SxProps} from '@mui/material';
6+
import {Skeleton, SxProps} from '@mui/material';
77
import classNames from 'classnames';
88
import {alpha, Theme} from '@mui/material/styles';
99
import {videoPlayerSx} from './Players/VideoPlayer.tsx';
10-
import {useTranslation} from 'react-i18next';
1110

1211
type Props = {
1312
asset: Asset;
@@ -23,12 +22,18 @@ function AssetThumb({
2322
},
2423
...domAttrs
2524
}: Props) {
26-
const {t} = useTranslation();
2725
let thumb: ReactNode | undefined;
2826

2927
if (pendingSourceFile) {
3028
thumb = (
31-
<CircularProgress title={t('common.uploading', `Uploading…`)} />
29+
<Skeleton
30+
style={{
31+
borderRadius: 0,
32+
transform: 'none',
33+
width: '100%',
34+
height: '100%',
35+
}}
36+
/>
3237
);
3338
} else if (thumbnail?.file) {
3439
thumb = (

0 commit comments

Comments
 (0)