{"size": 1624, "ext": "js", "max_stars_repo_path": "src/components/Share.js", "max_stars_repo_name": "yelabbassi/cinedantan", "max_stars_repo_stars_event_min_datetime": "2020-05-01T23:19:43.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-05T09:25:46.000Z", "max_issues_repo_path": "src/components/Share.js", "max_issues_repo_name": "cinedantan/webapp", "max_issues_repo_issues_event_min_datetime": "2021-09-02T03:04:00.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T20:44:52.000Z", "max_forks_repo_path": "src/components/Share.js", "max_forks_repo_name": "cinedantan/webapp", "max_forks_repo_forks_event_min_datetime": "2020-05-29T13:54:45.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-11T21:59:09.000Z"}
{"max_stars_count": 24, "max_issues_count": 7, "max_forks_count": 2, "avg_line_length": 27.5254237288, "max_line_length": 77, "alphanum_fraction": 0.474137931}
import React from 'react'

import {
    EmailIcon,
    EmailShareButton,
    TelegramIcon,
    TelegramShareButton,
    WhatsappIcon,
    WhatsappShareButton,
    RedditIcon,
    RedditShareButton,
  
    FacebookIcon,
    FacebookShareButton,
    TwitterIcon,
    TwitterShareButton
  } from 'react-share';
  
export default function Share({ url = window.location.href, title }) {
    return (
        <div style={{ textAlign: 'center' }}>
            {
                title &&  <h2 style={{ color: 'rgb(37,38,38)' }}>{title}</h2>
            }
           
            <div
                style={{
                    display: 'flex',
                    justifyContent: 'center',
                    cursor: 'pointer',
                }}
            >
                <EmailShareButton url={url}>
                    <EmailIcon size={32} round />
                </EmailShareButton>

                <TelegramShareButton url={url}>
                    <TelegramIcon size={32} round />
                </TelegramShareButton>

                <WhatsappShareButton url={url}>
                    <WhatsappIcon size={32} round />
                </WhatsappShareButton>

                <RedditShareButton url={url}>
                    <RedditIcon size={32} round />
                </RedditShareButton>

                <FacebookShareButton url={url}>
                    <FacebookIcon size={32} round />
                </FacebookShareButton>

                <TwitterShareButton url={url}>
                    <TwitterIcon size={32} round />
                </TwitterShareButton>
            </div>
        </div>
    )
}