From c9b98c24e4b847d2572fd37c9457c3acb77372dc Mon Sep 17 00:00:00 2001 From: Aashir Shaikh Date: Sat, 10 Jul 2021 05:30:20 +0500 Subject: [PATCH] expand sharing feature (#788) --- src/components/common/PostActions/index.js | 57 +++++++++++++++++++++- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/src/components/common/PostActions/index.js b/src/components/common/PostActions/index.js index f53cdaf4..208ae96c 100644 --- a/src/components/common/PostActions/index.js +++ b/src/components/common/PostActions/index.js @@ -27,9 +27,10 @@ import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { isMobile } from 'react-device-detect' import { setDefaultVotingWeightRequest } from 'store/settings/actions' -import { FacebookShareButton, FacebookIcon } from 'react-share' +import { FacebookShareButton, FacebookIcon, TelegramShareButton, TelegramIcon, WhatsappShareButton, WhatsappIcon, LinkedinShareButton, LinkedinIcon, FacebookMessengerShareButton, FacebookMessengerIcon, TwitterShareButton, TwitterIcon } from 'react-share' import MenuItem from '@material-ui/core/MenuItem' import Menu from '@material-ui/core/Menu' +import { invokeTwitterIntent } from 'services/helper' const PrettoSlider = withStyles({ root: { @@ -183,6 +184,10 @@ const useStyles = createUseStyles(theme => ({ backgroundColor: theme.background.primary, ...theme.font, }, + shareIcon: { + padding: 8, + background: 'red', + }, })) const ActionWrapper = ({ className, inlineClass, icon, stat, hideStats, onClick, disabled = false, tooltip = null, statOnClick = () => {} }) => { @@ -236,6 +241,8 @@ const PostActions = (props) => { defaultUpvoteStrength, } = props + const FACEBOOK_APP_ID = 236880454857514 + let payoutAdditionalStyle = {} let iconDetails = {} @@ -470,6 +477,15 @@ const PostActions = (props) => { open={Boolean(openCaret)} onClose={closeMenu} > + + { + setOpenCaret(false) + }} + > + invokeTwitterIntent(body)} /> + + { setOpenCaret(false) }} > - + + + { + setOpenCaret(false) + }} + > + + + + + {setOpenCaret(false)}}> + + + + + {setOpenCaret(false)}}> + + + + + {setOpenCaret(false)}}> + + +