diff --git a/package-lock.json b/package-lock.json index d347988..3bc8606 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "react-router-dom": "^6.20.0", "react-scripts": "5.0.1", "react-twitter-embed": "^4.0.4", + "react-web-share": "^2.0.2", "web-vitals": "^2.1.4" } }, @@ -15586,6 +15587,15 @@ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/react-web-share": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/react-web-share/-/react-web-share-2.0.2.tgz", + "integrity": "sha512-bGm1TJc6xtC0MhAnYFsrzT4En7l2oAdLTgCK7nk7b4xGTg3L5gOldiPrmYQ8a/dEXNydgekvOj/tfjduIlIRVA==", + "peerDependencies": { + "react": "^16 || ^17 || ^18", + "react-dom": "^16 || ^17 || ^18" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", diff --git a/package.json b/package.json index 7cea686..a17455c 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "react-router-dom": "^6.20.0", "react-scripts": "5.0.1", "react-twitter-embed": "^4.0.4", + "react-web-share": "^2.0.2", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/src/Post.js b/src/Post.js index cb5f15e..995a846 100644 --- a/src/Post.js +++ b/src/Post.js @@ -1,5 +1,6 @@ import React from 'react' import './Post.css' +import { RWebShare } from "react-web-share"; const Post = ({displayName, userName, verified, text, image, avatar,location}) => { return ( @@ -23,7 +24,18 @@ const Post = ({displayName, userName, verified, text, image, avatar,location}) =
+ + console.log("shared successfully!") + } + > +