aboutsummaryrefslogtreecommitdiff
path: root/src/pages/FeedPage/PollSubmission.tsx
diff options
context:
space:
mode:
authorilyayudovin <ilyayudovin123@gmail.com>2020-06-29 04:09:40 +0300
committerilyayudovin <ilyayudovin123@gmail.com>2020-06-29 04:09:40 +0300
commit37d3d4ca801ab282104ed41d97e10911e288947a (patch)
treed402ec6058582bd0124bdfd10e5a2d534634b768 /src/pages/FeedPage/PollSubmission.tsx
parent28c80d1c2e33706a3a754b3e5e26dc2685cf8592 (diff)
downloadwhich-ui-37d3d4ca801ab282104ed41d97e10911e288947a.tar.gz
delete images in poll submission
Diffstat (limited to 'src/pages/FeedPage/PollSubmission.tsx')
-rw-r--r--src/pages/FeedPage/PollSubmission.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pages/FeedPage/PollSubmission.tsx b/src/pages/FeedPage/PollSubmission.tsx
index 40ca3d7..9a3a042 100644
--- a/src/pages/FeedPage/PollSubmission.tsx
+++ b/src/pages/FeedPage/PollSubmission.tsx
@@ -54,9 +54,11 @@ const PollSubmission: React.FC<PropTypes> = ({ user }) => {
const handleClick = () => {
if (expanded) {
- post('/polls/', { authorId: user._id, contents }).then(res => {
- console.log(res.data);
- });
+ if(contents.left?.url && contents.right?.url ) {
+ post('/polls/', {authorId: user._id, contents}).then(res => {
+ console.log(res.data);
+ });
+ }
}
setExpanded(!expanded);
};