Refactor to using RNP & UI Updates.
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user