aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-21 19:11:32 -0400
committerIvan Chen <ivan@tagg.id>2021-07-21 19:11:32 -0400
commit9b94f60df0b62a9d3762a1963ec7dac024658a51 (patch)
treee0f16942d1db927ba6c45b19bb79d085490e7027 /src/components
parentfbb9d410b4a525dd6f21d5de7e1e3844b6cf78a7 (diff)
Update progress bar type
Diffstat (limited to 'src/components')
-rw-r--r--src/components/moments/MomentUploadProgressBar.tsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/components/moments/MomentUploadProgressBar.tsx b/src/components/moments/MomentUploadProgressBar.tsx
index 285f4e84..07d876e8 100644
--- a/src/components/moments/MomentUploadProgressBar.tsx
+++ b/src/components/moments/MomentUploadProgressBar.tsx
@@ -13,17 +13,23 @@ interface MomentUploadProgressBarProps {}
const MomentUploadProgressBar: React.FC<MomentUploadProgressBarProps> =
({}) => {
- const {momentUploadStatus} = useSelector((state: RootState) => state.user);
- const progress = useSharedValue(0);
+ const {momentUploadProgressBar} = useSelector(
+ (state: RootState) => state.user,
+ );
+ const progress = useSharedValue(0.001);
useEffect(() => {
- if (momentUploadStatus === MomentUploadStatusType.Uploading) {
+ if (
+ momentUploadProgressBar?.status === MomentUploadStatusType.Uploading
+ ) {
progress.value = withTiming(1, {
- duration: 30 * 1000,
+ duration: momentUploadProgressBar.originalVideoDuration * 1000,
easing: Easing.out(Easing.quad),
});
}
- }, [momentUploadStatus]);
+ }, [momentUploadProgressBar?.status]);
+
+ useEffect(() => {}, []);
return (
<View style={styles.background}>