diff options
Diffstat (limited to 'src/pages/FeedPage/PollSubmission.tsx')
-rw-r--r-- | src/pages/FeedPage/PollSubmission.tsx | 8 |
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); }; |