gatsby-core-theme 44.10.1 → 44.10.12-beta.1
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 +1 -0
- package/CHANGELOG.md +101 -0
- package/gatsby-browser.js +3 -145
- package/gatsby-config.js +3 -3
- package/gatsby-node.mjs +7 -1
- package/gatsby-ssr.js +142 -0
- package/package.json +2 -1
- package/src/components/app-ssr.js +16 -18
- package/src/components/atoms/admin/bar/index.js +6 -2
- package/src/components/atoms/admin/button/index.js +4 -3
- package/src/components/atoms/contact-form/index.js +2 -2
- package/src/components/atoms/market-dropdown/index.js +7 -9
- package/src/components/atoms/notifications/index.js +2 -3
- package/src/components/atoms/ratings/index.js +7 -6
- package/src/components/atoms/review-link/index.js +16 -11
- package/src/components/atoms/search/autocomplete/article/index.js +13 -9
- package/src/components/atoms/search/autocomplete/default/index.js +13 -9
- package/src/components/atoms/search/autocomplete/game/index.js +22 -12
- package/src/components/atoms/search/autocomplete/operator/index.js +26 -18
- package/src/components/molecules/bonus/template-one/index.js +15 -2
- package/src/components/molecules/bonus/template-two/index.js +7 -1
- package/src/components/molecules/cookie-modal/index.js +1 -1
- package/src/components/molecules/floating-area/index.js +6 -12
- package/src/components/molecules/footer/index.js +35 -27
- package/src/components/molecules/footer/variants/template-one/template-one.stories.js +70 -67
- package/src/components/molecules/footer/variants/template-one/template-one.test.js +92 -69
- package/src/components/molecules/footer/variants/template-three/template-three.stories.js +4 -4
- package/src/components/molecules/footer/variants/template-three/template-three.test.js +98 -73
- package/src/components/molecules/footer/variants/template-two/template-two.stories.js +3 -3
- package/src/components/molecules/footer/variants/template-two/template-two.test.js +96 -73
- package/src/components/molecules/header/variants/default/template-one/index.js +15 -13
- package/src/components/molecules/header/variants/default/template-one/template-one.test.js +37 -29
- package/src/components/molecules/header/variants/slot/template-one/templateone.test.js +32 -29
- package/src/components/molecules/leave-comment-form/index.js +90 -79
- package/src/components/molecules/main/index.js +5 -7
- package/src/components/molecules/menu/index.js +28 -30
- package/src/components/molecules/newsletter/form/index.js +2 -2
- package/src/components/molecules/newsletter/index.js +23 -19
- package/src/components/molecules/tnc/index.js +4 -2
- package/src/components/organisms/anchor/template-two/index.js +33 -18
- package/src/components/organisms/footer-navigation/index.js +10 -9
- package/src/components/organisms/navigation/navigationContext.js +28 -4
- package/src/components/organisms/search/index.js +17 -4
- package/src/constants/ratings-constant.js +7 -9
- package/src/helpers/getters.mjs +3 -3
- package/src/helpers/processImageNode.js +38 -30
- package/src/helpers/processImageNode.test.js +33 -24
- package/src/helpers/replaceMedia.js +2 -2
- package/src/resolver/games.mjs +1 -1
- package/src/resolver/operators.mjs +23 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useContext, useEffect, useRef } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import { toggleScroll } from "
|
|
4
|
-
import { NavigationContext } from "
|
|
3
|
+
import { toggleScroll } from "~helpers/scroll";
|
|
4
|
+
import { NavigationContext } from "~organisms/navigation/navigationContext";
|
|
5
5
|
import SpotlightItems from "./notification-items/spotlight";
|
|
6
6
|
import CardsItems from "./notification-items/cards-v2";
|
|
7
7
|
import BellIcon from "~images/icons/bell";
|
|
@@ -94,4 +94,3 @@ Notifications.propTypes = {
|
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
export default Notifications;
|
|
97
|
-
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
/* eslint-disable no-nested-ternary */
|
|
4
4
|
import React from "react";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
|
-
import { getObjectValue } from "
|
|
7
|
-
import keygen from "
|
|
6
|
+
import { getObjectValue } from "~helpers/getters";
|
|
7
|
+
import keygen from "~helpers/keygen";
|
|
8
8
|
import useTranslate from "~hooks/useTranslate/useTranslate";
|
|
9
9
|
import { operatorRatings } from "../../../constants/ratings-constant";
|
|
10
10
|
|
|
@@ -22,7 +22,7 @@ export default function Ratings({
|
|
|
22
22
|
? "operator"
|
|
23
23
|
: item?.type
|
|
24
24
|
: type;
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
const ratings = operatorRatings[typeCheck] || [];
|
|
27
27
|
|
|
28
28
|
const rangeText = {
|
|
@@ -50,8 +50,7 @@ export default function Ratings({
|
|
|
50
50
|
if (component && value) {
|
|
51
51
|
valueDiplayed = component || "-";
|
|
52
52
|
} else if (fieldValue.includes("volatility")) {
|
|
53
|
-
valueDiplayed =
|
|
54
|
-
rangeText[getObjectValue(item, fieldValue)] || "-";
|
|
53
|
+
valueDiplayed = rangeText[getObjectValue(item, fieldValue)] || "-";
|
|
55
54
|
} else {
|
|
56
55
|
valueDiplayed = value || "-";
|
|
57
56
|
}
|
|
@@ -85,7 +84,9 @@ export default function Ratings({
|
|
|
85
84
|
) : (
|
|
86
85
|
<>
|
|
87
86
|
{valueDiplayed}
|
|
88
|
-
{
|
|
87
|
+
{typeof valueDiplayed === "number" &&
|
|
88
|
+
fieldValue === "rtp" &&
|
|
89
|
+
"%"}
|
|
89
90
|
</>
|
|
90
91
|
)}
|
|
91
92
|
</li>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
|
-
import React from
|
|
3
|
-
import PropTypes from
|
|
2
|
+
import React from "react";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
4
|
|
|
5
|
-
import LinkCustom from
|
|
6
|
-
import useTranslate from
|
|
5
|
+
import LinkCustom from "~hooks/link";
|
|
6
|
+
import useTranslate from "~hooks/useTranslate/useTranslate";
|
|
7
7
|
|
|
8
8
|
const ReviewLink = ({
|
|
9
9
|
template,
|
|
@@ -18,21 +18,26 @@ const ReviewLink = ({
|
|
|
18
18
|
|
|
19
19
|
let isBonusTemplate = false;
|
|
20
20
|
|
|
21
|
-
if ([
|
|
21
|
+
if (["free_bonuses", "bonus_pages", "casino_bonus"].includes(template)) {
|
|
22
22
|
isBonusTemplate = true;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
<LinkCustom
|
|
26
|
+
<LinkCustom
|
|
27
|
+
className={className || ""}
|
|
28
|
+
nofollow={nofollow}
|
|
29
|
+
to={reviewPath}
|
|
30
|
+
>{`${
|
|
27
31
|
isBonusTemplate
|
|
28
|
-
? useTranslate(
|
|
29
|
-
|
|
32
|
+
? useTranslate("bonus", "[operator_name] Bonus").replace(
|
|
33
|
+
"[operator_name]",
|
|
30
34
|
pageName || operatorName
|
|
31
35
|
)
|
|
32
36
|
: useTranslate(
|
|
33
|
-
isComparisonTable ?
|
|
34
|
-
(pageName &&
|
|
35
|
-
|
|
37
|
+
isComparisonTable ? "read_review_comparison" : "read_review",
|
|
38
|
+
(pageName && "[operator_name]") ||
|
|
39
|
+
(operatorName && "[operator_name] Review")
|
|
40
|
+
)?.replace("[operator_name]", pageName || operatorName)
|
|
36
41
|
}`}</LinkCustom>
|
|
37
42
|
);
|
|
38
43
|
};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight";
|
|
4
|
+
import Button from "~atoms/button/button";
|
|
5
5
|
import ArticleIcon from "../../../../../images/icons/articleIcon";
|
|
6
|
-
import Link from
|
|
7
|
-
import styles from
|
|
6
|
+
import Link from "~hooks/link";
|
|
7
|
+
import styles from "./article.module.scss";
|
|
8
8
|
|
|
9
|
-
const Article = ({
|
|
9
|
+
const Article = ({
|
|
10
|
+
item = {},
|
|
11
|
+
btnText = "",
|
|
12
|
+
icon = <FaArrowRight title="Right-pointing Arrow Icon" />,
|
|
13
|
+
}) => (
|
|
10
14
|
<li>
|
|
11
|
-
<Link className={styles.row ||
|
|
12
|
-
|
|
15
|
+
<Link className={styles.row || ""} to={item?.path} title={item.title}>
|
|
16
|
+
<ArticleIcon />
|
|
13
17
|
<h3 className={styles.operatorTitle}>{item.title}</h3>
|
|
14
18
|
<Button
|
|
15
19
|
btnText={btnText}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import Link from
|
|
6
|
-
import styles from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight";
|
|
4
|
+
import Button from "~atoms/button/button";
|
|
5
|
+
import Link from "~hooks/link";
|
|
6
|
+
import styles from "./default.module.scss";
|
|
7
7
|
|
|
8
|
-
const Default = ({
|
|
8
|
+
const Default = ({
|
|
9
|
+
item = {},
|
|
10
|
+
btnText = "",
|
|
11
|
+
icon = <FaArrowRight title="Right-pointing Arrow Icon" />,
|
|
12
|
+
}) => (
|
|
9
13
|
<li>
|
|
10
|
-
<Link to={item?.path} title={item.title} className={styles.row ||
|
|
14
|
+
<Link to={item?.path} title={item.title} className={styles.row || ""}>
|
|
11
15
|
<h3 className={styles.operatorTitle}>{item.title}</h3>
|
|
12
16
|
<Button
|
|
13
17
|
btnText={btnText}
|
|
@@ -24,7 +28,7 @@ Default.propTypes = {
|
|
|
24
28
|
title: PropTypes.string,
|
|
25
29
|
}).isRequired,
|
|
26
30
|
btnText: PropTypes.string,
|
|
27
|
-
|
|
31
|
+
icon: PropTypes.node,
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
export default Default;
|
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { FaArrowRight } from
|
|
4
|
-
import Button from
|
|
5
|
-
import LazyImage from
|
|
6
|
-
import { imagePrettyUrl } from
|
|
7
|
-
import Link from
|
|
8
|
-
import styles from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight";
|
|
4
|
+
import Button from "~atoms/button/button";
|
|
5
|
+
import LazyImage from "~hooks/lazy-image";
|
|
6
|
+
import { imagePrettyUrl } from "~helpers/getters";
|
|
7
|
+
import Link from "~hooks/link";
|
|
8
|
+
import styles from "./game.module.scss";
|
|
9
9
|
|
|
10
|
-
const Game = ({
|
|
10
|
+
const Game = ({
|
|
11
|
+
item = {},
|
|
12
|
+
width = 56,
|
|
13
|
+
height = 56,
|
|
14
|
+
btnText = "",
|
|
15
|
+
icon = <FaArrowRight title="Right-pointing Arrow Icon" />,
|
|
16
|
+
}) => {
|
|
11
17
|
const { logo } = item;
|
|
12
18
|
|
|
13
19
|
return (
|
|
14
20
|
<li>
|
|
15
|
-
<Link to={item?.path} title={item.title} className={styles.row ||
|
|
21
|
+
<Link to={item?.path} title={item.title} className={styles.row || ""}>
|
|
16
22
|
<LazyImage
|
|
17
23
|
className={styles.gameImage}
|
|
18
24
|
width={width}
|
|
19
25
|
height={height}
|
|
20
|
-
src={
|
|
26
|
+
src={
|
|
27
|
+
logo
|
|
28
|
+
? imagePrettyUrl(logo, width, height)
|
|
29
|
+
: "/images/default-slot.jpg"
|
|
30
|
+
}
|
|
21
31
|
alt={item.title}
|
|
22
32
|
/>
|
|
23
33
|
<h3 className={styles.gameTitle}>{item.title}</h3>
|
|
@@ -42,7 +52,7 @@ Game.propTypes = {
|
|
|
42
52
|
width: PropTypes.number,
|
|
43
53
|
height: PropTypes.number,
|
|
44
54
|
btnText: PropTypes.string,
|
|
45
|
-
|
|
55
|
+
icon: PropTypes.node,
|
|
46
56
|
};
|
|
47
57
|
|
|
48
58
|
export default Game;
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { FaArrowRight } from
|
|
4
|
-
import Button from
|
|
5
|
-
import LazyImage from
|
|
6
|
-
import { imagePrettyUrl } from
|
|
7
|
-
import Link from
|
|
8
|
-
import styles from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight";
|
|
4
|
+
import Button from "~atoms/button/button";
|
|
5
|
+
import LazyImage from "~hooks/lazy-image";
|
|
6
|
+
import { imagePrettyUrl } from "~helpers/getters";
|
|
7
|
+
import Link from "~hooks/link";
|
|
8
|
+
import styles from "./operator.module.scss";
|
|
9
9
|
|
|
10
|
-
const Operator = ({
|
|
10
|
+
const Operator = ({
|
|
11
|
+
item = {},
|
|
12
|
+
width = 56,
|
|
13
|
+
height = 56,
|
|
14
|
+
btnText = "",
|
|
15
|
+
icon = <FaArrowRight title="Right-pointing Arrow Icon" />,
|
|
16
|
+
}) => {
|
|
11
17
|
const { logo } = item;
|
|
12
18
|
|
|
13
19
|
return (
|
|
14
20
|
<li>
|
|
15
|
-
<Link to={item?.path} title={item.title} className={styles.row ||
|
|
16
|
-
{logo &&
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
<Link to={item?.path} title={item.title} className={styles.row || ""}>
|
|
22
|
+
{logo && (
|
|
23
|
+
<LazyImage
|
|
24
|
+
className={styles.operatorImage}
|
|
25
|
+
width={width}
|
|
26
|
+
height={height}
|
|
27
|
+
src={imagePrettyUrl(logo, width, height)}
|
|
28
|
+
alt={item.title}
|
|
29
|
+
/>
|
|
30
|
+
)}
|
|
23
31
|
<h3 className={styles.operatorTitle}>{item.title}</h3>
|
|
24
32
|
<Button
|
|
25
33
|
to={item?.path}
|
|
@@ -42,7 +50,7 @@ Operator.propTypes = {
|
|
|
42
50
|
width: PropTypes.number,
|
|
43
51
|
height: PropTypes.number,
|
|
44
52
|
btnText: PropTypes.string,
|
|
45
|
-
|
|
53
|
+
icon: PropTypes.node,
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
export default Operator;
|
|
@@ -73,7 +73,13 @@ export default function Bonus({
|
|
|
73
73
|
tracker={module?.type || "main"}
|
|
74
74
|
modulePosition={modulePosition}
|
|
75
75
|
/>
|
|
76
|
-
{!tncFixed &&
|
|
76
|
+
{!tncFixed && (
|
|
77
|
+
<Tnc
|
|
78
|
+
isFixed={tncFixed}
|
|
79
|
+
operator={operator}
|
|
80
|
+
tracker={module?.type || "main"}
|
|
81
|
+
/>
|
|
82
|
+
)}
|
|
77
83
|
</div>
|
|
78
84
|
<OperatorCta
|
|
79
85
|
operator={operator}
|
|
@@ -85,7 +91,14 @@ export default function Bonus({
|
|
|
85
91
|
gtmClass="bonus-operator-cta-gtm"
|
|
86
92
|
/>
|
|
87
93
|
</div>
|
|
88
|
-
|
|
94
|
+
|
|
95
|
+
{tncFixed && (
|
|
96
|
+
<Tnc
|
|
97
|
+
isFixed={tncFixed}
|
|
98
|
+
operator={operator}
|
|
99
|
+
tracker={module?.type || "main"}
|
|
100
|
+
/>
|
|
101
|
+
)}
|
|
89
102
|
</div>
|
|
90
103
|
</div>
|
|
91
104
|
);
|
|
@@ -95,7 +95,13 @@ export default function TemplateOne({
|
|
|
95
95
|
)}
|
|
96
96
|
|
|
97
97
|
<BonusBox moduleName={moduleName} item={operator} tracker={module?.type || "main"} pageTemplate={pageTemplate} />
|
|
98
|
-
{!tncFixed &&
|
|
98
|
+
{!tncFixed && (
|
|
99
|
+
<Tnc
|
|
100
|
+
isFixed={tncFixed}
|
|
101
|
+
operator={operator}
|
|
102
|
+
tracker={module?.type || "main"}
|
|
103
|
+
/>
|
|
104
|
+
)}
|
|
99
105
|
</div>
|
|
100
106
|
</div>
|
|
101
107
|
|
|
@@ -4,7 +4,7 @@ import React, { useState, useRef, useEffect } from "react";
|
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
|
|
6
6
|
import { MdClose } from "@react-icons/all-files/md/MdClose";
|
|
7
|
-
import Link from "
|
|
7
|
+
import Link from "~hooks/link";
|
|
8
8
|
import useTranslate from "~hooks/useTranslate/useTranslate";
|
|
9
9
|
import LazyImage from "~hooks/lazy-image";
|
|
10
10
|
|
|
@@ -23,8 +23,8 @@ export default function FloatingArea({
|
|
|
23
23
|
pageContext,
|
|
24
24
|
template,
|
|
25
25
|
offsetTop = 400,
|
|
26
|
-
showCookies=true,
|
|
27
|
-
customCookieContent
|
|
26
|
+
showCookies = true,
|
|
27
|
+
customCookieContent,
|
|
28
28
|
}) {
|
|
29
29
|
const showScroll = isSticky(offsetTop);
|
|
30
30
|
const [closedBanner, setClosedBanner] = useState(false);
|
|
@@ -52,21 +52,15 @@ export default function FloatingArea({
|
|
|
52
52
|
|
|
53
53
|
const OperatorBanner =
|
|
54
54
|
operatorData && showOperatorBanner(operatorData, pageTemplate)
|
|
55
|
-
? lazy(() =>
|
|
56
|
-
import(
|
|
57
|
-
`gatsby-core-theme/src/components/molecules/bonus/template-two`
|
|
58
|
-
)
|
|
59
|
-
)
|
|
55
|
+
? lazy(() => import(`~molecules/bonus/template-two`))
|
|
60
56
|
: null;
|
|
61
57
|
|
|
62
58
|
const FooterNavigation =
|
|
63
59
|
(pageTypes?.[pageTemplate]?.footerNavigation ||
|
|
64
|
-
|
|
60
|
+
pageTypes.default?.footerNavigation) &&
|
|
65
61
|
footerNavigationData &&
|
|
66
62
|
footerNavigationData?.modules?.length > 0
|
|
67
|
-
? lazy(() =>
|
|
68
|
-
import(`gatsby-core-theme/src/components/organisms/footer-navigation`)
|
|
69
|
-
)
|
|
63
|
+
? lazy(() => import(`~organisms/footer-navigation`))
|
|
70
64
|
: null;
|
|
71
65
|
|
|
72
66
|
return (
|
|
@@ -148,5 +142,5 @@ FloatingArea.propTypes = {
|
|
|
148
142
|
offsetTop: PropTypes.number,
|
|
149
143
|
template: PropTypes.string,
|
|
150
144
|
showCookies: PropTypes.bool,
|
|
151
|
-
customCookieContent: PropTypes.node
|
|
145
|
+
customCookieContent: PropTypes.node,
|
|
152
146
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import React, { lazy, Suspense } from
|
|
1
|
+
import React, { lazy, Suspense } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import { getExtraField } from
|
|
4
|
-
import { generatePlaceholderString } from
|
|
5
|
-
import Security from
|
|
3
|
+
import { getExtraField } from "~helpers/getters";
|
|
4
|
+
import { generatePlaceholderString } from "~helpers/generators.mjs";
|
|
5
|
+
import Security from "~images/icons/security";
|
|
6
6
|
|
|
7
7
|
export const footerContent = (props) => {
|
|
8
8
|
let ModuleComponent = null;
|
|
9
9
|
|
|
10
10
|
switch (props.footerTemplate) {
|
|
11
|
-
case
|
|
12
|
-
ModuleComponent = lazy(() => import(
|
|
11
|
+
case "template_one":
|
|
12
|
+
ModuleComponent = lazy(() => import("./variants/template-one"));
|
|
13
13
|
return <ModuleComponent {...props} />;
|
|
14
|
-
case
|
|
15
|
-
ModuleComponent = lazy(() => import(
|
|
14
|
+
case "template_two":
|
|
15
|
+
ModuleComponent = lazy(() => import("./variants/template-two"));
|
|
16
16
|
return <ModuleComponent {...props} />;
|
|
17
|
-
case
|
|
18
|
-
ModuleComponent = lazy(() => import(
|
|
17
|
+
case "template_three":
|
|
18
|
+
ModuleComponent = lazy(() => import("./variants/template-three"));
|
|
19
19
|
return <ModuleComponent {...props} />;
|
|
20
20
|
default:
|
|
21
|
-
ModuleComponent = lazy(() => import(
|
|
21
|
+
ModuleComponent = lazy(() => import("./variants/template-one"));
|
|
22
22
|
return <ModuleComponent {...props} />;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const Footer = (props) => {
|
|
27
|
-
const { template
|
|
27
|
+
const { template, page, section } = props;
|
|
28
28
|
|
|
29
29
|
const helpText = `
|
|
30
30
|
<p>
|
|
@@ -42,7 +42,7 @@ const Footer = (props) => {
|
|
|
42
42
|
in order to get help.
|
|
43
43
|
</p>`;
|
|
44
44
|
|
|
45
|
-
const footerLogos = getExtraField(section?.extra_fields,
|
|
45
|
+
const footerLogos = getExtraField(section?.extra_fields, "logos");
|
|
46
46
|
|
|
47
47
|
const getFooterLogos = () => {
|
|
48
48
|
let refactoredFooterLogos = { children: [] };
|
|
@@ -62,31 +62,38 @@ const Footer = (props) => {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
const helpline = () => {
|
|
65
|
-
if (getExtraField(section?.extra_fields,
|
|
66
|
-
return generatePlaceholderString(
|
|
65
|
+
if (getExtraField(section?.extra_fields, "helpline")) {
|
|
66
|
+
return generatePlaceholderString(
|
|
67
|
+
getExtraField(section?.extra_fields, "helpline")
|
|
68
|
+
);
|
|
67
69
|
}
|
|
68
70
|
return null;
|
|
69
71
|
};
|
|
70
72
|
|
|
71
73
|
props = {
|
|
72
74
|
...props,
|
|
73
|
-
showLinks: template !==
|
|
74
|
-
copyrightDisclaimer: getExtraField(
|
|
75
|
-
|
|
75
|
+
showLinks: template !== "ppc",
|
|
76
|
+
copyrightDisclaimer: getExtraField(
|
|
77
|
+
section?.extra_fields,
|
|
78
|
+
"copyright_disclaimer"
|
|
79
|
+
),
|
|
80
|
+
footerLogos: page?.page?.responsibleGaming?.length
|
|
81
|
+
? getFooterLogos()
|
|
82
|
+
: footerLogos,
|
|
76
83
|
hasDisclaimer: true,
|
|
77
84
|
showCopyright: true,
|
|
78
|
-
footerMenu: getExtraField(section?.extra_fields,
|
|
79
|
-
asSeenOn: getExtraField(section?.extra_fields,
|
|
80
|
-
gamblingText: getExtraField(section?.extra_fields,
|
|
81
|
-
socialIcons: getExtraField(section?.extra_fields,
|
|
82
|
-
logo:
|
|
83
|
-
dmcaImage:
|
|
85
|
+
footerMenu: getExtraField(section?.extra_fields, "links"),
|
|
86
|
+
asSeenOn: getExtraField(section?.extra_fields, "as_seen_on"),
|
|
87
|
+
gamblingText: getExtraField(section?.extra_fields, "gambling_text"),
|
|
88
|
+
socialIcons: getExtraField(section?.extra_fields, "social_icons"),
|
|
89
|
+
logo: "/images/logo.svg",
|
|
90
|
+
dmcaImage: "/images/dmca.png",
|
|
84
91
|
dmcaWidth: 100,
|
|
85
92
|
dmcaHeight: 30,
|
|
86
93
|
securityIcon: <Security />,
|
|
87
94
|
helpText,
|
|
88
95
|
phoneNum: helpline(),
|
|
89
|
-
copyrightCustomText: getExtraField(section?.extra_fields,
|
|
96
|
+
copyrightCustomText: getExtraField(section?.extra_fields, "copyright_text"),
|
|
90
97
|
};
|
|
91
98
|
|
|
92
99
|
return <Suspense fallback={<></>}>{footerContent(props)}</Suspense>;
|
|
@@ -102,6 +109,7 @@ Footer.propTypes = {
|
|
|
102
109
|
page: PropTypes.shape({
|
|
103
110
|
page: PropTypes.shape({
|
|
104
111
|
responsibleGaming: PropTypes.arrayOf(PropTypes.shape({})),
|
|
105
|
-
})
|
|
112
|
+
}),
|
|
106
113
|
}),
|
|
107
|
-
}
|
|
114
|
+
};
|
|
115
|
+
|