aboutsummaryrefslogtreecommitdiff
path: root/src/containers/PollCreation/PollCreation.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-14 02:24:18 +0300
committereug-vs <eug-vs@keemail.me>2020-08-14 02:24:18 +0300
commit88d3c411efbf5f6ac74fa67e38c154f1e53d4938 (patch)
tree590bcc2d8cd25b054cdaeff877fb595528840347 /src/containers/PollCreation/PollCreation.tsx
parent60583c1496aeaf366087bff550da8e9288ff33cf (diff)
downloadwhich-ui-88d3c411efbf5f6ac74fa67e38c154f1e53d4938.tar.gz
feat: show upload progress
Diffstat (limited to 'src/containers/PollCreation/PollCreation.tsx')
-rw-r--r--src/containers/PollCreation/PollCreation.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/containers/PollCreation/PollCreation.tsx b/src/containers/PollCreation/PollCreation.tsx
index e613afd..e350179 100644
--- a/src/containers/PollCreation/PollCreation.tsx
+++ b/src/containers/PollCreation/PollCreation.tsx
@@ -73,17 +73,17 @@ const PollCreation: React.FC = () => {
{user && <UserStrip user={user} info="" />}
<Divider />
<div className={classes.images}>
- <PollCreationImage callback={setLeft} />
- <PollCreationImage callback={setRight} />
+ <PollCreationImage callback={setLeft} progress={progressLeft} />
+ <PollCreationImage callback={setRight} progress={progressRight} />
</div>
<Button
color="primary"
- disabled={!(isLeftReady && isRightReady)}
+ disabled={!(isLeftReady && isRightReady) || Boolean(progressLeft || progressRight)}
variant="contained"
onClick={handleClick}
fullWidth
>
- Submit
+ {(progressLeft || progressRight) ? 'Waiting for upload' : 'Submit'}
</Button>
</Card>
</Container>