gatsby-core-theme 36.0.0 → 36.0.2
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 +15 -0
- package/package.json +1 -1
- package/src/components/atoms/author-box/template-one/fact-check/index.js +4 -2
- package/src/components/atoms/author-box/template-one/index.js +2 -2
- package/src/components/atoms/author-box/template-three/fact-check/index.js +2 -1
- package/src/components/atoms/author-box/template-three/index.js +1 -1
- package/src/components/atoms/author-box/template-two/fact-check/index.js +4 -2
- package/src/components/atoms/author-box/template-two/index.js +1 -1
- package/src/components/atoms/menu/items/item/item.test.js +1 -3
- package/src/components/molecules/footer/variables/index.js +1 -2
- package/src/components/molecules/footer/variables/variables.test.js +20 -0
- package/src/components/molecules/footer/variants/template-two/index.js +1 -0
- package/src/components/molecules/header/variants/default/variables/variables.test.js +20 -0
- package/src/components/molecules/header/variants/operator/variables/variables.test.js +20 -0
- package/src/components/molecules/main/index.js +41 -27
- package/src/components/pages/body/index.js +41 -23
- package/src/constants/site-settings/navigation.js +1 -0
- package/src/helpers/getters.mjs +13 -2
- package/src/helpers/processor/common.mjs +2 -5
- package/src/helpers/processor/index.mjs +2 -0
- package/src/helpers/processor/modules.mjs +2 -2
- package/src/helpers/tracker.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [36.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v36.0.1...v36.0.2) (2024-08-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* author box reviewed by ([c7b7564](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c7b7564bcee16f5f9bfe9ce2caa0f83518c691f8))
|
|
7
|
+
* tests ([6506b80](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6506b807dcef263557ad8bea26ad14a9dfb3a762))
|
|
8
|
+
|
|
9
|
+
## [36.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v36.0.0...v36.0.1) (2024-08-21)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* cards v2 ([0632f74](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0632f7482bb4ecb16e9305b4f46921ae2761e015))
|
|
15
|
+
|
|
1
16
|
# [36.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v35.1.9...v36.0.0) (2024-08-21)
|
|
2
17
|
|
|
3
18
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
1
2
|
/* eslint-disable react/no-danger */
|
|
2
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { FaClock } from '@react-icons/all-files/fa/FaClock';
|
|
5
6
|
|
|
@@ -14,11 +15,12 @@ export default function FactCheck({
|
|
|
14
15
|
dateFormat = 'DD.MM.YYYY',
|
|
15
16
|
dateSeparator = '/',
|
|
16
17
|
readingTime = '',
|
|
17
|
-
reviewer
|
|
18
|
+
reviewer,
|
|
18
19
|
verifiedIconWidth = 14,
|
|
19
20
|
verifiedIconHeight = 14,
|
|
20
21
|
readTimeIcon = <FaClock title="Clock Icon" />,
|
|
21
22
|
}) {
|
|
23
|
+
|
|
22
24
|
return (
|
|
23
25
|
<>
|
|
24
26
|
{(readingTime || reviewer || date) && (
|
|
@@ -5,13 +5,13 @@ import AuthorDetails from '../details';
|
|
|
5
5
|
import AuthorDescription from '../description';
|
|
6
6
|
import FactCheck from './fact-check';
|
|
7
7
|
|
|
8
|
-
export default function AuthorBox({ author, reviewer
|
|
8
|
+
export default function AuthorBox({ author, reviewer, readingTime = '', date = '' }) {
|
|
9
9
|
return (
|
|
10
10
|
<div className={styles.container || ''} id="authorbox">
|
|
11
11
|
<AuthorDetails author={author} />
|
|
12
12
|
<AuthorDescription author={author} />
|
|
13
13
|
{author?.ribbon_label && <div className={styles.ribbon || ''}>{author?.ribbon_label}</div>}
|
|
14
|
-
<FactCheck author={author} reviewer={reviewer} readingTime={readingTime} date={date} />
|
|
14
|
+
{reviewer && <FactCheck author={author} reviewer={reviewer} readingTime={readingTime} date={date} />}
|
|
15
15
|
</div>
|
|
16
16
|
);
|
|
17
17
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
1
2
|
/* eslint-disable react/no-danger */
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
@@ -14,7 +15,7 @@ export default function FactCheck({
|
|
|
14
15
|
dateFormat = 'DD.MM.YYYY',
|
|
15
16
|
dateSeparator = '/',
|
|
16
17
|
readingTime = '',
|
|
17
|
-
reviewer
|
|
18
|
+
reviewer,
|
|
18
19
|
verifiedIconWidth = 14,
|
|
19
20
|
verifiedIconHeight = 14,
|
|
20
21
|
readTimeIcon = <FaClock title="Clock Icon" />,
|
|
@@ -6,7 +6,7 @@ import AuthorDescription from '../description';
|
|
|
6
6
|
import FactCheck from './fact-check';
|
|
7
7
|
import Expertion from './expertion';
|
|
8
8
|
|
|
9
|
-
export default function AuthorBox({ author, reviewer
|
|
9
|
+
export default function AuthorBox({ author, reviewer, readingTime = '', date = '' }) {
|
|
10
10
|
return (
|
|
11
11
|
<div className={styles.container || ''} id="authorbox">
|
|
12
12
|
{author?.ribbon_label && <div className={styles.ribbon || ''}>{author?.ribbon_label}</div>}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
1
2
|
/* eslint-disable react/no-danger */
|
|
2
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { FaClock } from '@react-icons/all-files/fa/FaClock';
|
|
5
6
|
|
|
@@ -14,11 +15,12 @@ export default function FactCheck({
|
|
|
14
15
|
dateFormat = 'DD.MM.YYYY',
|
|
15
16
|
dateSeparator = '/',
|
|
16
17
|
readingTime = '',
|
|
17
|
-
reviewer
|
|
18
|
+
reviewer,
|
|
18
19
|
verifiedIconWidth = 14,
|
|
19
20
|
verifiedIconHeight = 14,
|
|
20
21
|
readTimeIcon = <FaClock title="Clock Icon" />,
|
|
21
22
|
}) {
|
|
23
|
+
|
|
22
24
|
return (
|
|
23
25
|
<>
|
|
24
26
|
{(readingTime || reviewer || date) && (
|
|
@@ -10,7 +10,7 @@ export default function AuthorBox({ author, reviewer = {}, readingTime = '', dat
|
|
|
10
10
|
<div className={styles.container || ''} id="authorbox">
|
|
11
11
|
<AuthorDetails template="templateTwo" ribbon author={author} extraInfo />
|
|
12
12
|
<AuthorDescription template="templateTwo" author={author} />
|
|
13
|
-
<FactCheck author={author} reviewer={reviewer} readingTime={readingTime} date={date} />
|
|
13
|
+
{reviewer && <FactCheck author={author} reviewer={reviewer} readingTime={readingTime} date={date} />}
|
|
14
14
|
</div>
|
|
15
15
|
);
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render, cleanup, waitFor
|
|
2
|
+
import { render, cleanup, waitFor } from '@testing-library/react';
|
|
3
3
|
import '@testing-library/jest-dom/extend-expect';
|
|
4
4
|
|
|
5
5
|
import getNavigation from '~tests/factories/sections/navigationStatic.factory';
|
|
@@ -21,7 +21,6 @@ describe('Menu Component', () => {
|
|
|
21
21
|
test('render menu link item', async () => {
|
|
22
22
|
const { container, getByText } = render(<Item item={menus.children[3]} />);
|
|
23
23
|
await waitFor(() => {
|
|
24
|
-
expect(container).toBeTruthy();
|
|
25
24
|
expect(container.querySelectorAll('a')).toHaveLength(1);
|
|
26
25
|
expect(getByText('Sportsbooks').getAttribute('href')).toEqual('/sportsbooks');
|
|
27
26
|
});
|
|
@@ -30,7 +29,6 @@ describe('Menu Component', () => {
|
|
|
30
29
|
test('render item ', async () => {
|
|
31
30
|
const { container, getByText } = render(<Item item={menus.children[3]} />);
|
|
32
31
|
await waitFor(() => {
|
|
33
|
-
expect(container).toBeTruthy();
|
|
34
32
|
expect(container.querySelectorAll('a')).toHaveLength(1);
|
|
35
33
|
expect(getByText('Sportsbooks').getAttribute('href')).toEqual('/sportsbooks');
|
|
36
34
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Image from '~hooks/gatsby-img';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
|
|
5
|
-
const VariableComponent = ({ className }) => <div className={className || ''}
|
|
4
|
+
const VariableComponent = ({ className }) => <div className={className || ''} />;
|
|
6
5
|
|
|
7
6
|
export default VariableComponent;
|
|
8
7
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, cleanup } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
|
|
5
|
+
import Variable from '.';
|
|
6
|
+
|
|
7
|
+
describe('Variable Component', () => {
|
|
8
|
+
test('render with props', () => {
|
|
9
|
+
const { container } = render(
|
|
10
|
+
<Variable
|
|
11
|
+
className='test'
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
expect(container.querySelectorAll('.test')).toHaveLength(1);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
cleanup();
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, cleanup } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
|
|
5
|
+
import Variable from '.';
|
|
6
|
+
|
|
7
|
+
describe('Variable Component', () => {
|
|
8
|
+
test('render with props', () => {
|
|
9
|
+
const { container } = render(
|
|
10
|
+
<Variable
|
|
11
|
+
className='test'
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
expect(container.querySelectorAll('.test')).toHaveLength(1);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
cleanup();
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, cleanup } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
|
|
5
|
+
import Variable from '.';
|
|
6
|
+
|
|
7
|
+
describe('Variable Component', () => {
|
|
8
|
+
test('render with props', () => {
|
|
9
|
+
const { container } = render(
|
|
10
|
+
<Variable
|
|
11
|
+
className='test'
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
expect(container.querySelectorAll('.test')).toHaveLength(1);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
cleanup();
|
|
20
|
+
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React, { lazy, Suspense } from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { getURLParam } from
|
|
4
|
-
import Module from
|
|
5
|
-
import styles from
|
|
6
|
-
import keygen from
|
|
7
|
-
import settings from
|
|
8
|
-
import AuthorBoxComponent from
|
|
9
|
-
import { isSearchPath } from
|
|
10
|
-
import Search from
|
|
1
|
+
import React, { lazy, Suspense } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { getURLParam } from "gatsby-core-theme/src/helpers/getters";
|
|
4
|
+
import Module from "~molecules/module";
|
|
5
|
+
import styles from "./main.module.scss";
|
|
6
|
+
import keygen from "~helpers/keygen";
|
|
7
|
+
import settings from "../../../constants/settings.mjs";
|
|
8
|
+
import AuthorBoxComponent from "../../atoms/author-box";
|
|
9
|
+
import { isSearchPath } from "~helpers/isSearchPath";
|
|
10
|
+
import Search from "~pages/search";
|
|
11
11
|
|
|
12
12
|
const Main = ({
|
|
13
13
|
section = {},
|
|
@@ -20,23 +20,35 @@ const Main = ({
|
|
|
20
20
|
const siteName = process.env.GATSBY_SITE_NAME;
|
|
21
21
|
const showNewsletter =
|
|
22
22
|
!(
|
|
23
|
-
settings.newsletter[siteName]?.filter_pages?.includes(
|
|
24
|
-
settings.newsletter[siteName]?.filter_pages?.includes(
|
|
25
|
-
|
|
23
|
+
settings.newsletter[siteName]?.filter_pages?.includes("*") ||
|
|
24
|
+
settings.newsletter[siteName]?.filter_pages?.includes(
|
|
25
|
+
page?.relation_type
|
|
26
|
+
) ||
|
|
27
|
+
settings.newsletter.default?.filter_pages?.includes(
|
|
28
|
+
page?.relation_type
|
|
29
|
+
) ||
|
|
26
30
|
exclNewsletter
|
|
27
31
|
) && !process.env?.HIDE_NEWSLETTER;
|
|
28
32
|
const pathPrefixes = isSearchPath(allMarkets, page.path);
|
|
29
|
-
const HtmlSitemap = pageContext.sitemapData
|
|
33
|
+
const HtmlSitemap = pageContext.sitemapData
|
|
34
|
+
? lazy(() => import(`~atoms/sitemap`))
|
|
35
|
+
: null;
|
|
30
36
|
const AuthorBox = page.author_id;
|
|
31
|
-
const NotFound = page?.path?.includes(
|
|
32
|
-
|
|
37
|
+
const NotFound = page?.path?.includes("404")
|
|
38
|
+
? lazy(() => import(`~atoms/not-found`))
|
|
39
|
+
: null;
|
|
40
|
+
const Newsletter = showNewsletter
|
|
41
|
+
? lazy(() => import("~molecules/newsletter"))
|
|
42
|
+
: null;
|
|
33
43
|
const NewsletterSuccess =
|
|
34
|
-
showNewsletter &&
|
|
44
|
+
showNewsletter &&
|
|
45
|
+
typeof window !== "undefined" &&
|
|
46
|
+
Boolean(getURLParam("subscribed"))
|
|
35
47
|
? lazy(() => import(`../newsletter/success`))
|
|
36
48
|
: null;
|
|
37
49
|
|
|
38
50
|
return (
|
|
39
|
-
<main className={styles.modulePage ||
|
|
51
|
+
<main className={styles.modulePage || ""}>
|
|
40
52
|
{section.modules &&
|
|
41
53
|
section.modules.map((module, index) => (
|
|
42
54
|
<Module
|
|
@@ -60,17 +72,19 @@ const Main = ({
|
|
|
60
72
|
</Suspense>
|
|
61
73
|
)}
|
|
62
74
|
{AuthorBox && (
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/>
|
|
70
|
-
</Suspense>
|
|
75
|
+
<AuthorBoxComponent
|
|
76
|
+
author={page.author}
|
|
77
|
+
date={page.updated_at ? page.updated_at : page.created_at}
|
|
78
|
+
readingTime={page.reading_time}
|
|
79
|
+
reviewer={page.reviewer_id && page.reviewer}
|
|
80
|
+
/>
|
|
71
81
|
)}
|
|
72
82
|
{pathPrefixes && (
|
|
73
|
-
<Search
|
|
83
|
+
<Search
|
|
84
|
+
page={page}
|
|
85
|
+
serverData={serverData}
|
|
86
|
+
allMarkets={pageContext.allMarkets}
|
|
87
|
+
/>
|
|
74
88
|
)}
|
|
75
89
|
{Newsletter && (
|
|
76
90
|
<Suspense fallback={<></>}>
|
|
@@ -1,38 +1,48 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
2
|
/* eslint-disable no-useless-concat */
|
|
3
3
|
/* eslint-disable no-restricted-globals */
|
|
4
|
-
import React, { useEffect } from
|
|
5
|
-
import PropTypes from
|
|
4
|
+
import React, { useEffect } from "react";
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
6
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
7
|
-
import { v4 as uuidv4 } from
|
|
8
|
-
import { getSection } from
|
|
9
|
-
import Header from
|
|
10
|
-
import Main from
|
|
11
|
-
import Footer from
|
|
12
|
-
import Navigation from
|
|
13
|
-
import FloatingArea from
|
|
14
|
-
import styles from
|
|
15
|
-
import { setCookie, getCookie } from
|
|
16
|
-
import { pageTypes } from
|
|
7
|
+
import { v4 as uuidv4 } from "uuid";
|
|
8
|
+
import { getSection, getMarketSection } from "~helpers/getters";
|
|
9
|
+
import Header from "~molecules/header";
|
|
10
|
+
import Main from "~molecules/main";
|
|
11
|
+
import Footer from "~molecules/footer";
|
|
12
|
+
import Navigation from "~organisms/navigation";
|
|
13
|
+
import FloatingArea from "../../molecules/floating-area";
|
|
14
|
+
import styles from "./body.module.scss";
|
|
15
|
+
import { setCookie, getCookie } from "~helpers/cookies";
|
|
16
|
+
import { pageTypes } from "../../../constants/site-settings/navigation";
|
|
17
17
|
|
|
18
18
|
function Body({ pageContext, children, serverData }) {
|
|
19
19
|
const getBodySection = (name) => getSection(name, pageContext);
|
|
20
20
|
const { template } = pageContext.page;
|
|
21
|
-
const is404 = pageContext?.page?.path?.includes(
|
|
22
|
-
const main = getBodySection(
|
|
23
|
-
|
|
24
|
-
const
|
|
21
|
+
const is404 = pageContext?.page?.path?.includes("404");
|
|
22
|
+
const main = getBodySection("main");
|
|
23
|
+
|
|
24
|
+
const navigation = getMarketSection(
|
|
25
|
+
pageTypes[template]?.section || pageTypes.default.section,
|
|
26
|
+
pageContext
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const footer = pageTypes[template]?.disableFooter
|
|
30
|
+
? null
|
|
31
|
+
: getMarketSection("footer", pageContext);
|
|
25
32
|
|
|
26
33
|
useEffect(() => {
|
|
27
|
-
if (!getCookie(
|
|
28
|
-
setCookie(
|
|
34
|
+
if (!getCookie("affUUID")) {
|
|
35
|
+
setCookie("affUUID", uuidv4());
|
|
29
36
|
}
|
|
30
37
|
}, []);
|
|
31
38
|
|
|
32
|
-
const customComponent =
|
|
33
|
-
|
|
39
|
+
const customComponent =
|
|
40
|
+
pageTypes[template]?.customComponent ?? pageTypes.default.customComponent;
|
|
41
|
+
const marketDropdown =
|
|
42
|
+
pageTypes[template]?.marketDropdown ?? pageTypes.default.marketDropdown;
|
|
34
43
|
const menu = pageTypes[template]?.navMenu ?? pageTypes.default.navMenu;
|
|
35
|
-
const disableSearch =
|
|
44
|
+
const disableSearch =
|
|
45
|
+
pageTypes[template]?.disableSearch ?? pageTypes.default.disableSearch;
|
|
36
46
|
|
|
37
47
|
return (
|
|
38
48
|
<>
|
|
@@ -53,11 +63,19 @@ function Body({ pageContext, children, serverData }) {
|
|
|
53
63
|
)}
|
|
54
64
|
{!is404 && <Header serverData={serverData} section={pageContext} />}
|
|
55
65
|
{main && !children && (
|
|
56
|
-
<Main
|
|
66
|
+
<Main
|
|
67
|
+
serverData={serverData}
|
|
68
|
+
section={main}
|
|
69
|
+
pageContext={pageContext}
|
|
70
|
+
/>
|
|
57
71
|
)}
|
|
58
72
|
{children && <main>{children}</main>}
|
|
59
73
|
<Footer template={template} section={footer} />
|
|
60
|
-
<FloatingArea
|
|
74
|
+
<FloatingArea
|
|
75
|
+
pageContext={pageContext}
|
|
76
|
+
template={template}
|
|
77
|
+
customStyles={styles}
|
|
78
|
+
/>
|
|
61
79
|
</>
|
|
62
80
|
);
|
|
63
81
|
}
|
package/src/helpers/getters.mjs
CHANGED
|
@@ -25,8 +25,7 @@ export function getExtraField(extraFields, key, defaultValue) {
|
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export function
|
|
29
|
-
const page = pageContext && pageContext.page;
|
|
28
|
+
export function getMarketSection(shortCode, pageContext) {
|
|
30
29
|
const marketSections = pageContext && pageContext.marketSections;
|
|
31
30
|
|
|
32
31
|
// market has priority over page
|
|
@@ -34,6 +33,13 @@ export function getSection(shortCode, pageContext) {
|
|
|
34
33
|
return marketSections[shortCode];
|
|
35
34
|
}
|
|
36
35
|
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function getSection(shortCode, pageContext) {
|
|
40
|
+
const page = pageContext && pageContext.page;
|
|
41
|
+
const marketSections = pageContext && pageContext.marketSections;
|
|
42
|
+
|
|
37
43
|
// eslint-disable-next-line
|
|
38
44
|
if (
|
|
39
45
|
!page ||
|
|
@@ -42,6 +48,11 @@ export function getSection(shortCode, pageContext) {
|
|
|
42
48
|
) {
|
|
43
49
|
return null;
|
|
44
50
|
}
|
|
51
|
+
|
|
52
|
+
// market has priority over page
|
|
53
|
+
if (marketSections[shortCode]) {
|
|
54
|
+
return marketSections[shortCode];
|
|
55
|
+
}
|
|
45
56
|
|
|
46
57
|
return page.sections[shortCode] || {};
|
|
47
58
|
}
|
|
@@ -79,11 +79,8 @@ export function clonePageForCards(item, style) {
|
|
|
79
79
|
: item.relation;
|
|
80
80
|
|
|
81
81
|
if(object.relation && object.relation.bonus) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
delete object.relation.bonus.license_objects;
|
|
85
|
-
|
|
86
|
-
object.relation.bonus.deposit_methods = (object.relation.bonus.deposit_methods && object.relation.bonus.deposit_methods.length > 0) ? object.relation.bonus.deposit_methods.slice(0, 3) : [];
|
|
82
|
+
object.relation.bonus.withdrawal_methods = (object.relation.bonus.withdrawal_methods && object.relation.bonus.withdrawal_methods.length > 0) ? object.relation.bonus.withdrawal_methods.slice(0, 5) : [];
|
|
83
|
+
object.relation.bonus.deposit_methods = (object.relation.bonus.deposit_methods && object.relation.bonus.deposit_methods.length > 0) ? object.relation.bonus.deposit_methods.slice(0, 5) : [];
|
|
87
84
|
}
|
|
88
85
|
|
|
89
86
|
if (
|
|
@@ -343,6 +343,8 @@ export default {
|
|
|
343
343
|
// add reviewer object to page
|
|
344
344
|
if (page.reviewer_id !== null && data.authors[page.reviewer_id]) {
|
|
345
345
|
transformedPages[market][pageType][index].reviewer = data.authors[page.reviewer_id];
|
|
346
|
+
} else {
|
|
347
|
+
transformedPages[market][pageType][index].reviewer = null;
|
|
346
348
|
}
|
|
347
349
|
|
|
348
350
|
// add page styles object to page
|
|
@@ -134,12 +134,12 @@ export function processCardsV2(module, pagesCloned, pagesMappedById, pageId) {
|
|
|
134
134
|
const selectedReviewer = module.cards_selector_filters.page_reviewer;
|
|
135
135
|
const selectedCategories = module.cards_selector_filters.page_categories;
|
|
136
136
|
|
|
137
|
-
const allFilters = [selectedAuthors, selectedReviewer, selectedCategories, moduleSelectedProviders, moduleSelectedCategories, moduleSelectedTypes];
|
|
137
|
+
const allFilters = [cardType, pageTemplateId, selectedAuthors, selectedReviewer, selectedCategories, moduleSelectedProviders, moduleSelectedCategories, moduleSelectedTypes];
|
|
138
138
|
const u8 = new Uint8Array(allFilters);
|
|
139
139
|
const b64 = Buffer.from(u8).toString('base64');
|
|
140
140
|
|
|
141
|
-
|
|
142
141
|
|
|
142
|
+
|
|
143
143
|
if (cardType) {
|
|
144
144
|
// Get all pages by the selected page type
|
|
145
145
|
const pagesGroupedByType = pagesCloned[cardType];
|