diff --git a/package.json b/package.json index e8522a7..f49c913 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "rc-rate": "^2.13.1", "react": "^19.0.0", "react-dom": "^19.0.0", + "react-share": "^5.2.2", "react-spinners": "^0.15.0", "react-toastify": "^11.0.5", "swiper": "^11.2.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9314d41..15c4be3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,6 +47,9 @@ importers: react-dom: specifier: ^19.0.0 version: 19.1.0(react@19.1.0) + react-share: + specifier: ^5.2.2 + version: 5.2.2(react@19.1.0) react-spinners: specifier: ^0.15.0 version: 0.15.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -822,6 +825,14 @@ packages: resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} engines: {node: '>= 0.4'} + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -1377,6 +1388,9 @@ packages: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true + jsonp@0.2.1: + resolution: {integrity: sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw==} + jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -1521,6 +1535,9 @@ packages: motion-utils@12.7.2: resolution: {integrity: sha512-XhZwqctxyJs89oX00zn3OGCuIIpVevbTa+u82usWBC6pSHUd2AoNWiYa7Du8tJxJy9TFbZ82pcn5t7NOm1PHAw==} + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1692,6 +1709,11 @@ packages: react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + react-share@5.2.2: + resolution: {integrity: sha512-z0nbOX6X6vHHWAvXduNkYeJUKTKNpKM5Xpmc5a2BxjJhUWl+sE7AsSEMmYEUj2DuDjZr5m7KFIGF0sQPKcUN6w==} + peerDependencies: + react: ^17 || ^18 || ^19 + react-spinners@0.15.0: resolution: {integrity: sha512-ZO3/fNB9Qc+kgpG3SfdlMnvTX6LtLmTnOogb3W6sXIaU/kZ1ydEViPfZ06kSOaEsor58C/tzXw2wROGQu3X2pA==} peerDependencies: @@ -2703,6 +2725,10 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.2 + debug@2.6.9: + dependencies: + ms: 2.0.0 + debug@3.2.7: dependencies: ms: 2.1.3 @@ -3411,6 +3437,12 @@ snapshots: dependencies: minimist: 1.2.8 + jsonp@0.2.1: + dependencies: + debug: 2.6.9 + transitivePeerDependencies: + - supports-color + jsx-ast-utils@3.3.5: dependencies: array-includes: 3.1.8 @@ -3535,6 +3567,8 @@ snapshots: motion-utils@12.7.2: {} + ms@2.0.0: {} + ms@2.1.3: {} nanoid@3.3.11: {} @@ -3709,6 +3743,14 @@ snapshots: react-is@18.3.1: {} + react-share@5.2.2(react@19.1.0): + dependencies: + classnames: 2.5.1 + jsonp: 0.2.1 + react: 19.1.0 + transitivePeerDependencies: + - supports-color + react-spinners@0.15.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: react: 19.1.0 diff --git a/src/app/blogs/components/SingleBlogPage.tsx b/src/app/blogs/components/SingleBlogPage.tsx index e9fd076..9dfbdfc 100644 --- a/src/app/blogs/components/SingleBlogPage.tsx +++ b/src/app/blogs/components/SingleBlogPage.tsx @@ -7,6 +7,7 @@ import ContactUs from '../components/ContactUs' import { useGetBlogSingle } from '../hooks/useBlogsData' import { toJalaliDate } from '@/config/func' import MostVisited from './MostVisited' +import { TelegramShareButton, WhatsappShareButton } from 'react-share' type Props = { id: string @@ -65,24 +66,23 @@ const SingleBlogPage: FC = ({ id }) => {
اشتراک گذاری
- share - share - share + + + share + + + share +