Refactor to using RNP & UI Updates.

This commit is contained in:
Patrick Fic
2021-03-11 19:10:27 -07:00
parent 59f6605a40
commit a912b4f1d7
26 changed files with 689 additions and 440 deletions

View File

@@ -1,5 +1,5 @@
import { Ionicons } from "@expo/vector-icons";
import React from "react";
import React, { useMemo } from "react";
import {
ScrollView,
StyleSheet,
@@ -10,10 +10,15 @@ import {
import * as Progress from "react-native-progress";
import _ from "lodash";
export default function UploadProgress({ uploads, setUploads }) {
const uploadKeys = useMemo(() => {
if (uploads) return Object.keys(uploads);
return [];
}, [uploads]);
return (
<View style={styles.container}>
<ScrollView>
{Object.keys(uploads).map((key) => (
{uploadKeys.map((key) => (
<View key={key} style={styles.progressItem}>
<Text style={styles.progressText}>{key}</Text>
<View style={styles.progressBarContainer}>