aboutsummaryrefslogtreecommitdiff
path: root/src/pages/FeedPage/PollSubmission.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/FeedPage/PollSubmission.tsx')
-rw-r--r--src/pages/FeedPage/PollSubmission.tsx11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pages/FeedPage/PollSubmission.tsx b/src/pages/FeedPage/PollSubmission.tsx
index 3088279..b067914 100644
--- a/src/pages/FeedPage/PollSubmission.tsx
+++ b/src/pages/FeedPage/PollSubmission.tsx
@@ -48,18 +48,13 @@ const PollSubmission: React.FC<PropTypes> = ({ addPoll }) => {
setExpanded(false);
};
- const showSnackBar = (message: string) => {
- enqueueSnackbar(message, {
- variant: 'success'
- });
- };
-
-
const handleClick = () => {
if (expanded && readyToSubmit) {
post('/polls/', { contents }).then(response => {
addPoll(response.data);
- showSnackBar('Your poll has been successfully created!');
+ enqueueSnackbar('Your poll has been successfully created!', {
+ variant: 'success'
+ });
});
setContents({ ...emptyContents });
}