gatsby-core-theme 44.4.58 → 44.4.60

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/.ci.yml CHANGED
@@ -20,7 +20,7 @@ Theme Tests:
20
20
  - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta") && $PIPELINE == "automated"'
21
21
 
22
22
  Theme Publish:
23
- image: node:18.17.0
23
+ image: node:20.8.1
24
24
  stage: publish
25
25
  tags:
26
26
  - gatsby-runner-dev-docker
@@ -44,7 +44,7 @@ Theme Publish:
44
44
  - $PIPELINE != "content-trigger"
45
45
 
46
46
  Theme Beta Publish:
47
- image: node:18.17.0
47
+ image: node:20.8.1
48
48
  stage: publish-beta
49
49
  tags:
50
50
  - gatsby-runner-dev-docker
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [44.4.60](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.59...v44.4.60) (2025-10-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * improve comment logic ([f1786b8](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f1786b87f4705fea44dad32cd058734c65db6a5b))
7
+
8
+ ## [44.4.59](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.58...v44.4.59) (2025-10-01)
9
+
10
+
11
+ ### Config
12
+
13
+ * update node version on semantic release ([4803297](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4803297d6e6e032e732de2c4c7e95c51a3de890e))
14
+
1
15
  ## [44.4.58](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.57...v44.4.58) (2025-09-26)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.4.58",
3
+ "version": "44.4.60",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -4,7 +4,6 @@
4
4
  /* eslint-disable jsx-a11y/click-events-have-key-events */
5
5
  /* eslint-disable import/no-extraneous-dependencies */
6
6
  import React, { useContext } from 'react';
7
- import axios from 'axios';
8
7
  import PropTypes from 'prop-types';
9
8
  import LazyImage from '~hooks/lazy-image';
10
9
  import useTranslate from '~hooks/useTranslate/useTranslate';
@@ -31,21 +30,23 @@ const CommentVotes = ({
31
30
  "commentID": commentId
32
31
  };
33
32
 
34
- const headers = {
35
- headers: {
36
- "Content-Type": "application/json",
37
- Accept: "application/json",
38
- },
39
- };
40
-
41
33
  return new Promise((resolve, reject) => {
42
- axios
43
- .put('/api/put-vote', data, headers)
44
- .then((response) => {
45
- response.ok = response.status === 200;
46
- resolve(response);
34
+ fetch(`${process.env.GATSBY_API_COMMENT_URL}/api/put-vote`, {
35
+ method: 'PUT',
36
+ headers: {
37
+ 'Content-Type': 'application/json',
38
+ },
39
+ body: JSON.stringify(data),
40
+ })
41
+ .then(async (response) => {
42
+ if (response.ok) {
43
+ resolve(response);
44
+ } else {
45
+ const errorData = await response.json().catch(() => ({}));
46
+ reject(errorData?.errors?.join() || response.statusText);
47
+ }
47
48
  })
48
- .catch((error) => reject(error?.response?.data?.errors?.join() || error.message));
49
+ .catch((error) => reject(error.message));
49
50
  });
50
51
  }
51
52
 
@@ -2,7 +2,6 @@
2
2
  /* eslint-disable jsx-a11y/click-events-have-key-events */
3
3
  /* eslint-disable import/no-extraneous-dependencies */
4
4
  import React from 'react';
5
- import axios from "axios";
6
5
  import Form from "gatsby-core-theme/src/components/organisms/form";
7
6
  import PropTypes from 'prop-types';
8
7
  import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
@@ -52,22 +51,24 @@ const LeaveCommentForm = ({
52
51
  delete cleanedData?.post_anonymously;
53
52
  delete cleanedData?.tnc;
54
53
 
55
- const headers = {
56
- headers: {
57
- "Content-Type": "application/json",
58
- Accept: "application/json",
59
- },
60
- };
61
-
62
54
  return new Promise((resolve, reject) => {
63
- axios
64
- .post('/api/post-comment', cleanedData, headers)
65
- .then((response) => {
66
- response.ok = response.status === 200;
67
- if (response.ok) resetForm();
68
- resolve(response);
55
+ fetch(`${process.env.GATSBY_API_COMMENT_URL}/api/post-comment`, {
56
+ method: 'POST',
57
+ headers: {
58
+ 'Content-Type': 'application/json',
59
+ },
60
+ body: JSON.stringify(cleanedData),
61
+ })
62
+ .then(async (response) => {
63
+ if (response.ok) {
64
+ resetForm();
65
+ resolve(response);
66
+ } else {
67
+ const errorData = await response.json().catch(() => ({}));
68
+ reject(errorData?.errors?.join() || response.statusText);
69
+ }
69
70
  })
70
- .catch((error) => reject(error?.response?.data?.errors?.join() || error.message));
71
+ .catch((error) => reject(error.message));
71
72
  });
72
73
  };
73
74