From 3cbf292b6d4976589428d0841cd1201057d104d4 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 8 Oct 2020 15:51:19 +0300 Subject: feat: use icon in header instead of submit button --- src/containers/PollCreation/PollCreation.tsx | 29 +++++++++++----------------- 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'src/containers') diff --git a/src/containers/PollCreation/PollCreation.tsx b/src/containers/PollCreation/PollCreation.tsx index b7ee00a..18c3c6b 100644 --- a/src/containers/PollCreation/PollCreation.tsx +++ b/src/containers/PollCreation/PollCreation.tsx @@ -3,11 +3,12 @@ import Bluebird from 'bluebird'; import { useHistory } from 'react-router-dom'; import { makeStyles } from '@material-ui/core/styles'; import { - Button, + IconButton, Card, Container, LinearProgress } from '@material-ui/core'; +import SendIcon from '@material-ui/icons/Send'; import { useSnackbar } from 'notistack'; import useS3Preupload from './useS3Preupload'; @@ -46,7 +47,7 @@ const PollCreation: React.FC = () => { progress: rightProgress } = useS3Preupload(); - const handleClick = async () => { + const handleSubmit = async () => { try { const [leftUrl, rightUrl] = await Bluebird.all([resolveLeft(), resolveRight()]); @@ -67,8 +68,14 @@ const PollCreation: React.FC = () => { } }; + const submitIcon = ( + + + + ); + return ( - + {user && } @@ -76,21 +83,7 @@ const PollCreation: React.FC = () => { - { - leftProgress || rightProgress - ? - : ( - - ) - } + {(leftProgress > 0 || rightProgress > 0) && } -- cgit v1.2.3