gatsby-core-theme 44.4.11 → 44.4.13

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [44.4.13](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.12...v44.4.13) (2025-07-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added api server function to demo ([283f498](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/283f4981c7df76935aa3f53e600e1ec470d5fe14))
7
+
8
+ ## [44.4.12](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.11...v44.4.12) (2025-07-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * try server side functions ([039453a](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/039453aacf5d105aba1e0c36ff9d99afea4b146a))
14
+
1
15
  ## [44.4.11](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.10...v44.4.11) (2025-07-16)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.4.11",
3
+ "version": "44.4.13",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -14,7 +14,6 @@ const LeaveCommentForm = ({
14
14
  showLabels = true,
15
15
  showButtonIcon = false,
16
16
  buttonLabel = 'Add Comment',
17
- submitUrl = `${process.env.GATSBY_API_URL_V2}/v0.1/content/comments`,
18
17
  successMessage = 'Comment Added',
19
18
  failMessage = 'Comment Not Added',
20
19
  validationMessage = 'Fill all required fields',
@@ -39,20 +38,13 @@ const LeaveCommentForm = ({
39
38
  delete data?.post_anonymously;
40
39
  delete data?.tnc;
41
40
 
42
- const headers = {
43
- headers: {
44
- "X-ID": process.env.GATSBY_API_V2_X_ID,
45
- "X-Signature": process.env.GATSBY_API_V2_X_SIGNATURE,
46
- "Content-Type": "application/json",
47
- Accept: "application/json",
48
- },
49
- };
50
-
51
41
  return new Promise((resolve, reject) => {
52
42
  axios
53
- .post(submitUrl, data, headers)
54
- .then((response) => resolve(response.data.result))
55
- .catch((error) => reject(error?.response?.data?.errors?.join() || error.message));
43
+ .post("/api/post-comment", data)
44
+ .then((res) => resolve(res.data))
45
+ .catch((err) =>
46
+ reject(err?.response?.data?.message || "Something went wrong")
47
+ );
56
48
  });
57
49
  };
58
50
 
@@ -82,7 +74,6 @@ LeaveCommentForm.propTypes = {
82
74
  id: PropTypes.number,
83
75
  path: PropTypes.string,
84
76
  }).isRequired,
85
- submitUrl: PropTypes.string,
86
77
  successMessage: PropTypes.string,
87
78
  failMessage: PropTypes.string,
88
79
  validationMessage: PropTypes.string,