gatsby-core-theme 40.0.34 → 40.0.36
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,21 @@
|
|
|
1
|
+
## [40.0.36](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.35...v40.0.36) (2024-11-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix tests ([ff37177](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ff371775811a2c0ef972faf10f5ef87153b3d19c))
|
|
7
|
+
* remove pageTemplate logjik ([c8396d8](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/c8396d82eef96cb5b0450a98b77cfcbba7dac561))
|
|
8
|
+
|
|
9
|
+
## [40.0.35](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.34...v40.0.35) (2024-11-14)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* toplist tracker ([e6da7f8](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/e6da7f8f6fc53719ca506db726133c970436975c))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* Merge branch 'toplist-fix-links' into 'master' ([3605777](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/360577755f9e31597d6e9f2f330c6d30f90bbef3))
|
|
18
|
+
|
|
1
19
|
## [40.0.34](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.33...v40.0.34) (2024-11-14)
|
|
2
20
|
|
|
3
21
|
|
package/package.json
CHANGED
|
@@ -45,14 +45,14 @@ const OperatorCtaButton = ({
|
|
|
45
45
|
const referer =
|
|
46
46
|
typeof document !== 'undefined' && document?.referrer
|
|
47
47
|
? document.referrer
|
|
48
|
-
: ''
|
|
48
|
+
: '';
|
|
49
|
+
|
|
49
50
|
const prettyLink = `${prettyTracker(
|
|
50
51
|
operator,
|
|
51
52
|
trackerType,
|
|
52
|
-
false
|
|
53
|
-
pageTemplate
|
|
53
|
+
false
|
|
54
54
|
)}`
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
const translateBtn =
|
|
57
57
|
status && translationsObj[status]
|
|
58
58
|
? // eslint-disable-next-line react-hooks/rules-of-hooks
|
package/src/helpers/getters.mjs
CHANGED
|
@@ -207,17 +207,7 @@ export function prettyTracker(
|
|
|
207
207
|
operator,
|
|
208
208
|
trackerType = "main",
|
|
209
209
|
provider = false,
|
|
210
|
-
|
|
211
|
-
) {
|
|
212
|
-
if (
|
|
213
|
-
pageTemplateName &&
|
|
214
|
-
operator &&
|
|
215
|
-
operator.links &&
|
|
216
|
-
operator.links[pageTemplateName]
|
|
217
|
-
) {
|
|
218
|
-
return generateTrackerLink(operator, pageTemplateName, provider);
|
|
219
|
-
}
|
|
220
|
-
|
|
210
|
+
) {
|
|
221
211
|
if (
|
|
222
212
|
!operator ||
|
|
223
213
|
!operator.short_name ||
|
|
@@ -138,19 +138,6 @@ describe('Getters Helper', () => {
|
|
|
138
138
|
expect(Getters.prettyTracker({ short_name: 'short', relation_type: 'game' })).toEqual(
|
|
139
139
|
'/no/visit/short'
|
|
140
140
|
);
|
|
141
|
-
expect(
|
|
142
|
-
Getters.prettyTracker(
|
|
143
|
-
{
|
|
144
|
-
type: 'casino',
|
|
145
|
-
relation_type: 'casino',
|
|
146
|
-
short_name: 'short',
|
|
147
|
-
links: { 'page-template-test': 'granular' },
|
|
148
|
-
},
|
|
149
|
-
'non_main',
|
|
150
|
-
false,
|
|
151
|
-
'page-template-test'
|
|
152
|
-
)
|
|
153
|
-
).toEqual('/no/visit/short/page-template-test');
|
|
154
141
|
});
|
|
155
142
|
|
|
156
143
|
test('getBonus()', () => {
|
|
@@ -188,7 +188,7 @@ export function processCardsV2(
|
|
|
188
188
|
// Populate pagesList if page type and template exists
|
|
189
189
|
pagesList =
|
|
190
190
|
!pagesGroupedByTemplateId[`${cardType}_${market}`] ||
|
|
191
|
-
|
|
191
|
+
!pagesGroupedByTemplateId[`${cardType}_${market}`][pageTemplateId]
|
|
192
192
|
? []
|
|
193
193
|
: pagesGroupedByTemplateId[`${cardType}_${market}`][pageTemplateId];
|
|
194
194
|
} else {
|
|
@@ -334,53 +334,55 @@ export function processTopListModule(
|
|
|
334
334
|
if (listItem.id && toplists && toplists[listItem.id.toString()]) {
|
|
335
335
|
listItem.market = toplists[listItem.id].market?.short_code;
|
|
336
336
|
listItem.items = toplists[listItem.id].items;
|
|
337
|
+
listItem.one_liner = toplists[listItem.id].one_liner;
|
|
338
|
+
listItem.tracker = toplists[listItem.id].tracker;
|
|
337
339
|
}
|
|
338
|
-
|
|
340
|
+
|
|
339
341
|
listItem.items = listItem.items
|
|
340
342
|
? listItem.items.map((item) => {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
343
|
+
const operatorRelation = Object.values(relations.operator).find(
|
|
344
|
+
(operator) =>
|
|
345
|
+
operator.operator_id === item.operator_id &&
|
|
346
|
+
operator.market === listItem.market &&
|
|
347
|
+
type === operator.type
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
if (operatorRelation) {
|
|
351
|
+
operatorRelation.ribbons =
|
|
352
|
+
item.ribbon_ids && item.ribbon_ids.length === 0
|
|
353
|
+
? operatorRelation.ribbons
|
|
354
|
+
: item.ribbon_ids;
|
|
355
|
+
|
|
356
|
+
operatorRelation.selling_points =
|
|
357
|
+
item.selling_points && item.selling_points.length === 0
|
|
358
|
+
? operatorRelation.selling_points
|
|
359
|
+
: item.selling_points.map(sellingPoint => translations ? translations[sellingPoint] : sellingPoint);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const operatorPage =
|
|
363
|
+
pages && pages.operator && operatorRelation
|
|
364
|
+
? pages.operator.filter(
|
|
365
|
+
(page) =>
|
|
366
|
+
page.relation.operator_id === operatorRelation.operator_id
|
|
367
|
+
)
|
|
368
|
+
: [];
|
|
369
|
+
|
|
370
|
+
const reviewLink =
|
|
371
|
+
operatorPage.length > 0 ? operatorPage[0].path : null;
|
|
372
|
+
|
|
373
|
+
const clone = pick(
|
|
374
|
+
sanitizeOperatorData(
|
|
375
|
+
cloneDeep(operatorRelation),
|
|
376
|
+
operatorPage,
|
|
377
|
+
[],
|
|
378
|
+
[],
|
|
379
|
+
data
|
|
380
|
+
),
|
|
381
|
+
topListPickKeys
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
return Object.assign(clone, { review_link: reviewLink });
|
|
385
|
+
})
|
|
384
386
|
: [];
|
|
385
387
|
return listItem;
|
|
386
388
|
});
|
|
@@ -431,9 +433,9 @@ export function processSpotlightModule(module = {}, content) {
|
|
|
431
433
|
export function processFaq(module = {}, content) {
|
|
432
434
|
// eslint-disable-next-line no-unused-expressions
|
|
433
435
|
module.items && module.items.map(item => {
|
|
434
|
-
item.question =
|
|
435
|
-
item.answer =
|
|
436
|
-
})
|
|
436
|
+
item.question = (content && content[item.question]) || item.question;
|
|
437
|
+
item.answer = (content && content[item.answer]) || item.answer;
|
|
438
|
+
})
|
|
437
439
|
}
|
|
438
440
|
|
|
439
441
|
export function processModule(
|
|
@@ -486,7 +488,7 @@ export function processModule(
|
|
|
486
488
|
toplists,
|
|
487
489
|
translations
|
|
488
490
|
);
|
|
489
|
-
} else if(module.name === "faq") {
|
|
491
|
+
} else if (module.name === "faq") {
|
|
490
492
|
processFaq(module, content);
|
|
491
493
|
} else if (module.name === "spotlights") {
|
|
492
494
|
processSpotlightModule(module, content);
|