sfc-utils 1.4.114 → 1.4.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,44 @@
1
- import React, {useEffect, useState} from 'react'
2
- import * as shareStyles from '../styles/modules/share.module.less'
3
- import { appCheck } from '../appcheck.js'
1
+ import React, { useEffect, useState } from "react";
2
+ import * as shareStyles from "../styles/modules/share.module.less";
3
+ import { appCheck } from "../appcheck.js";
4
4
 
5
5
  const ShareButtons = ({ meta, urlAdd }) => {
6
6
  // We need to run appCheck in useEffect because we need to wait for the DOM to be ready
7
- let [hideSocial, setHideSocial] = useState(false)
7
+ let [hideSocial, setHideSocial] = useState(false);
8
8
  useEffect(() => {
9
9
  if (appCheck()) {
10
- setHideSocial(true)
10
+ setHideSocial(true);
11
11
  }
12
- }, [])
12
+ }, []);
13
13
 
14
14
  // Extension to URL if passed in
15
15
  if (!urlAdd) {
16
- urlAdd = ''
16
+ urlAdd = "";
17
17
  }
18
18
 
19
19
  let facebookClick = (e) => {
20
- const link = e.currentTarget.getAttribute('href')
21
- e.preventDefault()
20
+ const link = e.currentTarget.getAttribute("href");
21
+ e.preventDefault();
22
22
  if (link) {
23
- window.open(link, 'facebook-share-dialog', 'width=626,height=436')
23
+ window.open(link, "facebook-share-dialog", "width=626,height=436");
24
24
  }
25
- }
25
+ };
26
26
 
27
- let subfolder = ''
27
+ let subfolder = "";
28
28
  if (meta.PROJECT.SUBFOLDER) {
29
- subfolder = meta.PROJECT.SUBFOLDER + '/'
29
+ subfolder = meta.PROJECT.SUBFOLDER + "/";
30
30
  }
31
31
 
32
32
  return (
33
33
  <div className={shareStyles.wrapper} id="sharebutton-box">
34
- {!hideSocial &&
34
+ {!hideSocial && (
35
35
  <>
36
36
  {/* Twitter */}
37
37
  <a
38
- href={`https://twitter.com/intent/tweet?url=${meta.MAIN_DOMAIN}%2F${subfolder}${meta.PROJECT.SLUG}%2F${urlAdd}&text=${meta.PROJECT.TWITTER_TEXT}`}
38
+ href={`https://x.com/intent/post?url=${meta.MAIN_DOMAIN}%2F${subfolder}${meta.PROJECT.SLUG}%2F${urlAdd}&text=${meta.PROJECT.TWITTER_TEXT}`}
39
39
  className={shareStyles.link}
40
40
  >
41
- <svg
41
+ {/* <svg
42
42
  className={shareStyles.svg}
43
43
  data-icon="twitter"
44
44
  role="img"
@@ -52,6 +52,21 @@ const ShareButtons = ({ meta, urlAdd }) => {
52
52
  fill="currentColor"
53
53
  d="M222 51.29c.15 2.16.15 4.34.15 6.52 0 66.74-50.8 143.69-143.69 143.69A142.91 142.91 0 0 1 1 178.82a102.72 102.72 0 0 0 12 .72 101.29 101.29 0 0 0 62.72-21.66 50.53 50.53 0 0 1-47.18-35.07 50.35 50.35 0 0 0 22.8-.86 50.53 50.53 0 0 1-40.52-49.5v-.64a50.25 50.25 0 0 0 22.92 6.32 50.55 50.55 0 0 1-15.6-67.42 143.38 143.38 0 0 0 104.08 52.77 50.55 50.55 0 0 1 86.06-46.06 101.19 101.19 0 0 0 32.06-12.26 50.66 50.66 0 0 1-22.2 27.93 100.89 100.89 0 0 0 29-7.94A102.84 102.84 0 0 1 222 51.29z"
54
54
  />
55
+ </svg> */}
56
+ <svg
57
+ className={shareStyles.svg}
58
+ data-icon="twitter"
59
+ role="img"
60
+ aria-hidden="true"
61
+ focusable="false"
62
+ xmlns="http://www.w3.org/2000/svg"
63
+ viewBox="0 0 512 512"
64
+ >
65
+ <path
66
+ data-name="Twitter Logo"
67
+ fill="currentColor"
68
+ d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"
69
+ />
55
70
  </svg>
56
71
  </a>
57
72
  {/* Facebook */}
@@ -77,7 +92,7 @@ const ShareButtons = ({ meta, urlAdd }) => {
77
92
  </svg>
78
93
  </a>
79
94
  </>
80
- }
95
+ )}
81
96
  {/* Email */}
82
97
  <a
83
98
  href={`mailto:?subject=${meta.PROJECT.TITLE}&body=${meta.PROJECT.DESCRIPTION}%0A%0A${meta.MAIN_DOMAIN}%2F${subfolder}${meta.PROJECT.SLUG}%2F${urlAdd}`}
@@ -100,7 +115,7 @@ const ShareButtons = ({ meta, urlAdd }) => {
100
115
  </svg>
101
116
  </a>
102
117
  </div>
103
- )
104
- }
118
+ );
119
+ };
105
120
 
106
- export default ShareButtons
121
+ export default ShareButtons;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.114",
3
+ "version": "1.4.115",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",