Improve cloudinary media upload experience.

This commit is contained in:
Patrick Fic
2022-06-21 11:41:42 -07:00
parent 49b77315ba
commit 9eb8a43884
8 changed files with 196 additions and 235 deletions

View File

@@ -1,6 +1,6 @@
import * as MediaLibrary from "expo-media-library";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import {
ActivityIndicator,
Alert,
@@ -18,16 +18,11 @@ import {
selectCurrentCameraJobId,
selectDeleteAfterUpload,
} from "../../redux/app/app.selectors";
import {
selectBodyshop,
selectCurrentUser,
} from "../../redux/user/user.selectors";
import { formatBytes } from "../../util/document-upload.utility";
import { handleLocalUpload } from "../../util/local-document-upload.utility";
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
bodyshop: selectBodyshop,
selectedCameraJobId: selectCurrentCameraJobId,
deleteAfterUpload: selectDeleteAfterUpload,
});
@@ -35,8 +30,6 @@ const mapStateToProps = createStructuredSelector({
export default connect(mapStateToProps, null)(UploadProgress);
export function UploadProgress({
currentUser,
bodyshop,
selectedCameraJobId,
deleteAfterUpload,
uploads,
@@ -49,8 +42,6 @@ export function UploadProgress({
speed: 0,
});
const { t } = useTranslation();
useEffect(() => {
//Set the state of uploads to do.
if (uploads) {