From ef44b865ab26b4bc61f4d1a65e3c62d475f012b5 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Thu, 26 May 2022 13:54:04 +0530 Subject: [PATCH] update conditional renderings --- src/components/UploadProgress/dialog.tsx | 145 +++++++++--------- src/components/UploadProgress/header.tsx | 6 +- src/components/UploadProgress/progressBar.tsx | 24 +-- 3 files changed, 87 insertions(+), 88 deletions(-) diff --git a/src/components/UploadProgress/dialog.tsx b/src/components/UploadProgress/dialog.tsx index bf3015ba1..dc03075bb 100644 --- a/src/components/UploadProgress/dialog.tsx +++ b/src/components/UploadProgress/dialog.tsx @@ -32,82 +32,83 @@ export function UploadProgressDialog({ fileCounter={props.fileCounter} now={props.now} /> - - {props.uploadStage === UPLOAD_STAGES.UPLOADING && ( - + {props.uploadStage === UPLOAD_STAGES.UPLOADING && ( + + )} + + - )} - - - {props.uploadStage === UPLOAD_STAGES.FINISH && - filesNotUploaded && ( - - {constants.FILE_NOT_UPLOADED_LIST} - - )} - - - - - - - - + {props.uploadStage === UPLOAD_STAGES.FINISH && + filesNotUploaded && ( + + {constants.FILE_NOT_UPLOADED_LIST} + + )} + + + + + + + + )} {props.uploadStage === UPLOAD_STAGES.FINISH && ( - + ); } diff --git a/src/components/UploadProgress/progressBar.tsx b/src/components/UploadProgress/progressBar.tsx index 970bc2406..c5e55593b 100644 --- a/src/components/UploadProgress/progressBar.tsx +++ b/src/components/UploadProgress/progressBar.tsx @@ -2,22 +2,24 @@ import React from 'react'; import { LinearProgress, Divider, Box } from '@mui/material'; import { UPLOAD_STAGES } from 'constants/upload'; -export function UploadProgressBar({ uploadStage, now, expanded }) { +export function UploadProgressBar({ uploadStage, now }) { return ( - + {(uploadStage === UPLOAD_STAGES.READING_GOOGLE_METADATA_FILES || uploadStage === UPLOAD_STAGES.EXTRACTING_METADATA || uploadStage === UPLOAD_STAGES.UPLOADING) && ( - + <> + + + )} - ); }