1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

fixed uploads

This commit is contained in:
muerwre 2019-08-21 18:50:13 +07:00
parent cad4e683bc
commit 32b9a0dbbb
9 changed files with 52 additions and 37 deletions

View file

@ -6,6 +6,7 @@ import * as styles from './styles.scss';
import { ImageUpload } from '~/components/upload/ImageUpload';
import { IFile } from '~/redux/types';
import { IUploadStatus } from '~/redux/uploads/reducer';
import { getURL } from '~/utils/dom';
interface IProps {
items: IFile[];
@ -30,9 +31,10 @@ const SortableList = SortableContainer(
<div className={styles.grid}>
{items.map((file, index) => (
<SortableItem key={file.id} index={index} collection={0}>
<ImageUpload id={file.id} thumb={file.url} />
<ImageUpload id={file.id} thumb={getURL(file.url)} />
</SortableItem>
))}
{locked.map((item, index) => (
<SortableItem key={item.temp_id} index={index} collection={1} disabled>
<ImageUpload thumb={item.preview} progress={item.progress} is_uploading />