gatsby-core-theme 44.4.56 → 44.4.58
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 +18 -0
- package/package.json +1 -1
- package/src/components/atoms/admin/button/index.js +1 -1
- package/src/components/molecules/leave-comment-form/index.js +6 -4
- package/src/components/organisms/comments/index.js +2 -3
- package/src/constants/schema.js +1 -0
- package/src/helpers/schema.js +32 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [44.4.58](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.57...v44.4.58) (2025-09-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix the issue ([8a70580](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/8a70580120d69d82cdc8e023c0df5509849e3b21))
|
|
7
|
+
* fix toplist redirection on admin bar and comments form ([4c0f3b5](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4c0f3b568d3a57d7f17e3a1c1908f0e91f70e108))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
* Merge branch 'comments-fix' into 'master' ([d12464e](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/d12464e81f04c0858f38a4876d9c5fd04afbc96a))
|
|
11
|
+
|
|
12
|
+
## [44.4.57](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.56...v44.4.57) (2025-09-11)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* added option to include toplist in schema ([f335572](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f3355722385dc2c9cc27de4f5b4ddf9b3728bc36))
|
|
18
|
+
|
|
1
19
|
## [44.4.56](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.55...v44.4.56) (2025-09-10)
|
|
2
20
|
|
|
3
21
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ const getDMSLink = (module) => {
|
|
|
11
11
|
|
|
12
12
|
switch (module.name) {
|
|
13
13
|
case "top_list":
|
|
14
|
-
hercLink += `toplists/${module.items ? module.items[0].id : ""}
|
|
14
|
+
hercLink += `toplists/operators/${module.items ? module.items[0].id : ""}`;
|
|
15
15
|
linkText = "Edit Toplist";
|
|
16
16
|
break;
|
|
17
17
|
case "bonus":
|
|
@@ -21,11 +21,11 @@ const LeaveCommentForm = ({
|
|
|
21
21
|
buttonIcon = <FaArrowRight fontSize={20} title="Right-pointing Arrow Icon" />,
|
|
22
22
|
}) => {
|
|
23
23
|
const activeMarket = page?.market;
|
|
24
|
+
const isDev = process.env.NODE_ENV === 'development';
|
|
24
25
|
|
|
25
26
|
const customSubmit = (form, resetForm) => {
|
|
26
27
|
const formData = new FormData(form);
|
|
27
|
-
const data = Object.fromEntries(formData.entries());
|
|
28
|
-
|
|
28
|
+
const data = Object.fromEntries(formData.entries());
|
|
29
29
|
const cleanedData = isReply
|
|
30
30
|
? Object.entries(data).reduce((acc, [key, value]) => {
|
|
31
31
|
if (key.startsWith('post_anonymously_')) acc.post_anonymously = value;
|
|
@@ -34,8 +34,10 @@ const LeaveCommentForm = ({
|
|
|
34
34
|
return acc;
|
|
35
35
|
}, {})
|
|
36
36
|
: data;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
if((cleanedData?.["g-recaptcha-response"] === '' || !cleanedData?.tnc) && !isDev) return;
|
|
40
|
+
|
|
39
41
|
if(parentCommentID) cleanedData.parent_id = parentCommentID;
|
|
40
42
|
|
|
41
43
|
cleanedData.reference_id = page?.id;
|
|
@@ -7,12 +7,10 @@ import { VotesProvider } from '../../../context/VotesProvider';
|
|
|
7
7
|
const Comments = ({ pageContext }) => {
|
|
8
8
|
const { comments, authors } = pageContext;
|
|
9
9
|
|
|
10
|
-
if (!comments) return null;
|
|
11
|
-
|
|
12
10
|
return (
|
|
13
11
|
<div>
|
|
14
12
|
<LeaveCommentForm page={pageContext.page} />
|
|
15
|
-
<VotesProvider>
|
|
13
|
+
{comments && <VotesProvider>
|
|
16
14
|
{comments.map((comment) => (
|
|
17
15
|
<CommentTree
|
|
18
16
|
key={comment.comment_id}
|
|
@@ -23,6 +21,7 @@ const Comments = ({ pageContext }) => {
|
|
|
23
21
|
/>
|
|
24
22
|
))}
|
|
25
23
|
</VotesProvider>
|
|
24
|
+
}
|
|
26
25
|
</div>
|
|
27
26
|
);
|
|
28
27
|
};
|
package/src/constants/schema.js
CHANGED
package/src/helpers/schema.js
CHANGED
|
@@ -218,6 +218,7 @@ export function processSpeakableModules(modules) {
|
|
|
218
218
|
|
|
219
219
|
export function webPageSchema(page, pageImage) {
|
|
220
220
|
const speakAbleModules = processSpeakableModules(page?.sections?.main?.modules || []);
|
|
221
|
+
const toplistModule = page?.sections?.main?.modules && page?.sections?.main?.modules.find((module) => module.name === 'top_list');
|
|
221
222
|
|
|
222
223
|
const schema = {
|
|
223
224
|
'@context': 'https://schema.org',
|
|
@@ -235,6 +236,37 @@ export function webPageSchema(page, pageImage) {
|
|
|
235
236
|
url: `${process.env.GATSBY_SITE_URL}`,
|
|
236
237
|
inLanguage: getLanguage(page?.language),
|
|
237
238
|
},
|
|
239
|
+
hasPart: SchemaConstant.includeToplistSchema && toplistModule?.items?.[0]?.items ?
|
|
240
|
+
toplistModule?.items?.[0]?.items.slice(0, 10).map((item, index) => ({
|
|
241
|
+
'@type': 'Recommendation',
|
|
242
|
+
position: index + 1,
|
|
243
|
+
reviewRating: {
|
|
244
|
+
'@type': 'Rating',
|
|
245
|
+
worstRating: 1,
|
|
246
|
+
bestRating: 5,
|
|
247
|
+
ratingValue: item?.rating,
|
|
248
|
+
},
|
|
249
|
+
author: {
|
|
250
|
+
"@type": "Person",
|
|
251
|
+
name: item?.author_name || page?.author?.name,
|
|
252
|
+
jobTitle: item?.author_title || page?.author?.author_title,
|
|
253
|
+
email: item?.author_email || page?.author?.email_address,
|
|
254
|
+
image: (item?.author_image || page?.author?.image) ? `${process.env.IMAGE_CDN_URL}/${item?.author_image || page?.author?.image}` : '',
|
|
255
|
+
sameAs: item?.author_same_as ? item?.author_same_as
|
|
256
|
+
.map((socialLink) => socialLink) : [
|
|
257
|
+
page?.author?.linkedin_profile,
|
|
258
|
+
page?.author?.twitter_profile,
|
|
259
|
+
page?.author?.facebook_profile,
|
|
260
|
+
page?.author?.instagram_profile,
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
itemReviewed: {
|
|
264
|
+
"@type": "OnlineBusiness",
|
|
265
|
+
name: item?.name,
|
|
266
|
+
url: item?.review_link ? `${process.env.GATSBY_SITE_URL}${item?.review_link}` : '',
|
|
267
|
+
image: item?.logo?.filename ? `${process.env.IMAGE_CDN_URL}/${item?.logo?.filename}` : '',
|
|
268
|
+
}
|
|
269
|
+
})) : '',
|
|
238
270
|
reviewedBy: page?.reviewer_id
|
|
239
271
|
? {
|
|
240
272
|
'@type': 'Person',
|