File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -17,35 +17,37 @@ import siteMetadata from '@/data/siteMetadata'
17
17
18
18
const shareUrl = typeof window !== 'undefined' ? window . location ?. href : siteMetadata . siteUrl
19
19
20
+ const title = typeof document !== 'undefined' ? document . title : siteMetadata . title
21
+
20
22
const ReactShare = [
21
- < FacebookShareButton key = "facebook" url = { shareUrl } title = { document . title } >
23
+ < FacebookShareButton key = "facebook" url = { shareUrl } title = { title } >
22
24
< FacebookIcon size = { 32 } round />
23
25
</ FacebookShareButton > ,
24
26
< LinkedinShareButton
25
27
key = "linkedin"
26
28
url = { shareUrl }
27
29
summary = { siteMetadata . description }
28
30
source = { siteMetadata . siteUrl }
29
- title = { document . title }
31
+ title = { title }
30
32
>
31
33
< LinkedinIcon size = { 32 } round />
32
34
</ LinkedinShareButton > ,
33
- < RedditShareButton key = "reddit" url = { shareUrl } title = { document . title } >
35
+ < RedditShareButton key = "reddit" url = { shareUrl } title = { title } >
34
36
< RedditIcon size = { 32 } round />
35
37
</ RedditShareButton > ,
36
- < TelegramShareButton key = "telegram" title = { document . title } url = { shareUrl } >
38
+ < TelegramShareButton key = "telegram" title = { title } url = { shareUrl } >
37
39
< TelegramIcon size = { 32 } round />
38
40
</ TelegramShareButton > ,
39
41
< EmailShareButton
40
42
key = "email"
41
- title = { document . title }
43
+ title = { title }
42
44
url = { shareUrl }
43
45
subject = { siteMetadata . title }
44
46
body = "body"
45
47
>
46
48
< EmailIcon size = { 32 } round />
47
49
</ EmailShareButton > ,
48
- < TwitterShareButton key = "twitter" url = { shareUrl } title = { document . title } >
50
+ < TwitterShareButton key = "twitter" url = { shareUrl } title = { title } >
49
51
< TwitterIcon size = { 32 } round />
50
52
</ TwitterShareButton > ,
51
53
]
You can’t perform that action at this time.
0 commit comments