We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 944d26f commit 47c2906Copy full SHA for 47c2906
.changeset/quiet-wolves-whisper.md
@@ -0,0 +1,4 @@
1
+---
2
+"react-share": patch
3
4
+Fix `EmailShareButton`: a bug slipped in that broke the sharing functionality.
src/EmailShareButton.ts
@@ -1,4 +1,3 @@
-import type React from 'react';
import objectToGetParams from './utils/objectToGetParams';
import createShareButton from './hocs/createShareButton';
@@ -22,11 +21,8 @@ const EmailShareButton = createShareButton<Options>(
22
21
}),
23
{
24
openShareDialogOnClick: false,
25
- onClick: (event: React.MouseEvent<HTMLButtonElement>) => {
26
- const link = event.currentTarget.getAttribute('data-link');
27
- if (link) {
28
- window.location.href = link;
29
- }
+ onClick: (_, link: string) => {
+ window.location.href = link;
30
},
31
32
);
0 commit comments