diff --git a/src/components/Profile/SocialIcons/SocialIcons.jsx b/src/components/Profile/SocialIcons/SocialIcons.jsx index d291a341..e0b308c5 100644 --- a/src/components/Profile/SocialIcons/SocialIcons.jsx +++ b/src/components/Profile/SocialIcons/SocialIcons.jsx @@ -8,8 +8,6 @@ import LinkedInIcon from "@mui/icons-material/LinkedIn"; import GitHubIcon from "@mui/icons-material/GitHub"; import TwitterIcon from "@mui/icons-material/Twitter"; import LinkIcon from "@mui/icons-material/Link"; -import { useSelector } from "react-redux"; - const useStyles = makeStyles(theme => ({ root: { @@ -34,65 +32,34 @@ const useStyles = makeStyles(theme => ({ export default function SocialIcons(props) { const classes = useStyles(); - const profileData = useSelector(({ firebase: { profile } }) => profile); - - console.log(profileData) - - const openSocialMediaLink = (link) => { - window.open(link, "_blank"); - }; - - - const copyPageUrlToClipboard = () => { - const pageUrl = window.location.href; - navigator.clipboard.writeText(pageUrl) - .then(() => { - alert("Profile link copied to clipboard!"); - }) - .catch((error) => { - console.error("Error copying page URL to clipboard:", error); - }); - }; - return ( - {profileData?.link_facebook != "" && - openSocialMediaLink(`https://facebook.com/${profileData.link_facebook}`)} - > - - - } - {profileData?.link_linkedin != "" && - + + + openSocialMediaLink(`https://linkedin.com/in/${profileData.link_linkedin}`)} - > - - - } - {profileData?.link_github != "" && - openSocialMediaLink(`https://github.com/${profileData.link_github}`)} data-testId="GithubIcon"> - - - } - {profileData?.link_twitter != "" && - openSocialMediaLink(`https://twitter.com/${profileData.link_twitter}`)} - > - - - } - + > + + + + + + + + +