diff --git a/src/components/ProfileBanner/profile/ProfileCardOne/index.jsx b/src/components/ProfileBanner/profile/ProfileCardOne/index.jsx index 5e442525..4e69e744 100644 --- a/src/components/ProfileBanner/profile/ProfileCardOne/index.jsx +++ b/src/components/ProfileBanner/profile/ProfileCardOne/index.jsx @@ -24,6 +24,21 @@ export default function ProfileCardOne({ const handleClose = () => { setAnchorEl(null); }; + + const handleShare = () => { + if (navigator.share) { + navigator.share({ + title: document.title, + text: `Check out ${name}'s profile on our platform!`, + url: window.location.href + }) + .then(() => console.log("Share successful")) + .catch((error) => console.error("Share failed", error)); + } else { + alert("Web Share API is not supported in your browser."); + } + }; + return ( <>