gatsby-matrix-theme 40.0.19 → 40.0.21
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 +4 -5
- package/CHANGELOG.md +40 -0
- package/jest.config.js +1 -1
- package/package.json +2 -2
- package/src/components/atoms/cards/article-card/template-one/index.js +2 -4
- package/src/components/atoms/cards/article-card/template-one/template-one.testtt.js +51 -0
- package/src/components/atoms/cards/game-cards/template-five/index.js +4 -5
- package/src/components/atoms/cards/game-cards/template-four/index.js +4 -5
- package/src/components/atoms/cards/game-cards/template-one/index.js +1 -6
- package/src/components/atoms/cards/game-cards/template-three/index.js +4 -5
- package/src/components/atoms/cards/game-cards/template-two/index.js +4 -5
- package/src/components/atoms/cards/operator-card/template-four/index.js +2 -4
- package/src/components/atoms/cards/operator-card/template-four/template-four.test.js +31 -31
- package/src/components/atoms/cards/operator-card/template-one/index.js +4 -7
- package/src/components/atoms/cards/operator-card/template-one/template-one.test.js +31 -31
- package/src/components/atoms/cards/operator-card/template-three/index.js +4 -7
- package/src/components/atoms/cards/operator-card/template-three/template-three.test.js +31 -31
- package/src/components/atoms/cards/operator-card/template-two/index.js +4 -8
- package/src/components/atoms/cards/operator-card/template-two/template-two.test.js +31 -31
- package/src/components/atoms/cards/payment-method/template-one/index.js +2 -5
- package/src/components/atoms/cards/payment-method/template-three/index.js +4 -6
- package/src/components/atoms/footer/hotline/index.js +21 -25
- package/src/components/atoms/ratings/index.js +1 -1
- package/src/components/molecules/cookie-modal/index.js +4 -1
- package/src/components/molecules/header/variants/operator/template-five/index.js +1 -1
- package/src/components/molecules/header/variants/operator/template-four/index.js +2 -4
- package/src/components/molecules/header/variants/operator/template-one-two/index.js +2 -4
- package/src/components/molecules/header/variants/operator/template-three/index.js +2 -4
- package/src/components/molecules/operator-details/index.js +3 -21
- package/src/components/molecules/operator-details/operator-details.test.js +16 -16
- package/src/components/molecules/wagering-calculator/index.js +3 -7
- package/src/components/molecules/wagering-calculator/wagering-calculator.test.js +11 -11
- package/src/components/organisms/cards/index.js +4 -5
- package/src/components/organisms/cards/module-introduction/index.js +4 -8
- package/src/components/organisms/cards/template-one/cards.module.scss +24 -0
- package/src/components/organisms/cards/template-one/index.js +59 -12
- package/src/components/organisms/cards/template-two/index.js +2 -2
- package/src/components/organisms/cards/template-two/item/index.js +11 -9
- package/src/constants/ratings-constant.js +2 -1
- package/src/gatsby-core-theme/components/molecules/floating-area/index.js +21 -17
- package/src/gatsby-core-theme/components/molecules/header/header.module.scss +24 -0
- package/src/gatsby-core-theme/components/molecules/header/header.test.js +1 -15
- package/src/gatsby-core-theme/components/molecules/header/index.js +241 -210
- package/src/gatsby-core-theme/components/molecules/main/index.js +68 -38
- package/src/gatsby-core-theme/components/molecules/module/index.js +117 -65
- package/src/gatsby-core-theme/components/molecules/module/module.module.scss +9 -0
- package/src/gatsby-core-theme/components/molecules/search/index.js +3 -8
- package/src/gatsby-core-theme/components/organisms/cookie-consent/cookie-consent.module.scss +5 -0
- package/src/gatsby-core-theme/components/organisms/toplist/index.js +8 -11
- package/src/gatsby-core-theme/components/pages/body/index.js +20 -32
- package/src/gatsby-core-theme/components/pages/search/index.js +1 -8
- package/src/gatsby-core-theme/hooks/tabs/index.js +9 -10
- package/src/helpers/cards.js +8 -8
- package/storybook/public/177.d172c821.iframe.bundle.js +1 -0
- package/storybook/public/179.cf86fb79.iframe.bundle.js +2 -0
- package/storybook/public/232.0187b657.iframe.bundle.js +1 -0
- package/storybook/public/240.bceabc4d.iframe.bundle.js +1 -0
- package/storybook/public/36.6d7d7dac.iframe.bundle.js +1 -0
- package/storybook/public/395.c1efbb64.iframe.bundle.js +2 -0
- package/storybook/public/395.c1efbb64.iframe.bundle.js.LICENSE.txt +19 -0
- package/storybook/public/420.a736e0a4.iframe.bundle.js +1 -0
- package/storybook/public/441.785aac5c.iframe.bundle.js +1 -0
- package/storybook/public/475.d67cc45e.iframe.bundle.js +1 -0
- package/storybook/public/477.9c72cb2c.iframe.bundle.js +1 -0
- package/storybook/public/504.6c39549e.iframe.bundle.js +1 -0
- package/storybook/public/563.10ed9a30.iframe.bundle.js +1 -0
- package/storybook/public/597.76b11f56.iframe.bundle.js +1 -0
- package/storybook/public/604.9bf212fc.iframe.bundle.js +1 -0
- package/storybook/public/61.24d29b3a.iframe.bundle.js +1 -0
- package/storybook/public/620.006a92ae.iframe.bundle.js +2 -0
- package/storybook/public/631.01156847.iframe.bundle.js +1 -0
- package/storybook/public/672.3058d279.iframe.bundle.js +1 -0
- package/storybook/public/679.4b227ee0.iframe.bundle.js +1 -0
- package/storybook/public/728.ae4470e4.iframe.bundle.js +7 -0
- package/storybook/public/{972.46b935fe.iframe.bundle.js.LICENSE.txt → 728.ae4470e4.iframe.bundle.js.LICENSE.txt} +0 -8
- package/storybook/public/{972.46b935fe.iframe.bundle.js.map → 728.ae4470e4.iframe.bundle.js.map} +1 -1
- package/storybook/public/776.44fd86a4.iframe.bundle.js +1 -0
- package/storybook/public/777.54713435.iframe.bundle.js +1 -0
- package/storybook/public/778.65a1be79.iframe.bundle.js +1 -0
- package/storybook/public/780.3a6a2927.iframe.bundle.js +2 -0
- package/storybook/public/794.abd55b25.iframe.bundle.js +1 -0
- package/storybook/public/796.8a8f559c.iframe.bundle.js +1 -0
- package/storybook/public/854.9fc784ba.iframe.bundle.js +1 -0
- package/storybook/public/909.0e3d61f8.iframe.bundle.js +1 -0
- package/storybook/public/943.bb1590d6.iframe.bundle.js +1 -0
- package/storybook/public/964.10c64556.iframe.bundle.js +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.845fe2d1.iframe.bundle.js +1 -0
- package/storybook/public/project.json +1 -1
- package/storybook/public/runtime~main.2fdfdc96.iframe.bundle.js +1 -0
- package/src/components/atoms/cards/article-card/template-one/template-one.test.js +0 -51
- package/src/components/organisms/footer-navigation/footer-navigation.module.scss +0 -63
- package/src/components/organisms/footer-navigation/footer-navigation.stories.js +0 -122
- package/src/components/organisms/footer-navigation/index.js +0 -63
- package/storybook/public/113.10a9116f.iframe.bundle.js +0 -1
- package/storybook/public/127.17fc3e0b.iframe.bundle.js +0 -1
- package/storybook/public/162.d30676dc.iframe.bundle.js +0 -1
- package/storybook/public/172.1e3aefdb.iframe.bundle.js +0 -1
- package/storybook/public/183.b66d2a78.iframe.bundle.js +0 -1
- package/storybook/public/200.d678bbe9.iframe.bundle.js +0 -1
- package/storybook/public/203.52d417b8.iframe.bundle.js +0 -1
- package/storybook/public/225.6dca798a.iframe.bundle.js +0 -2
- package/storybook/public/26.e7520637.iframe.bundle.js +0 -1
- package/storybook/public/274.0e5a096a.iframe.bundle.js +0 -1
- package/storybook/public/283.219e438b.iframe.bundle.js +0 -1
- package/storybook/public/313.f14e679f.iframe.bundle.js +0 -1
- package/storybook/public/326.da0ba286.iframe.bundle.js +0 -1
- package/storybook/public/329.31f288b0.iframe.bundle.js +0 -1
- package/storybook/public/347.9b0cc0b2.iframe.bundle.js +0 -1
- package/storybook/public/357.40e0e31a.iframe.bundle.js +0 -1
- package/storybook/public/377.0129ee10.iframe.bundle.js +0 -1
- package/storybook/public/426.5bbf0dd8.iframe.bundle.js +0 -1
- package/storybook/public/43.44dc45b5.iframe.bundle.js +0 -1
- package/storybook/public/487.04548d26.iframe.bundle.js +0 -1
- package/storybook/public/495.b7d9f489.iframe.bundle.js +0 -1
- package/storybook/public/521.cac47219.iframe.bundle.js +0 -1
- package/storybook/public/555.99d9c86b.iframe.bundle.js +0 -1
- package/storybook/public/567.17326796.iframe.bundle.js +0 -1
- package/storybook/public/590.25fcc3e8.iframe.bundle.js +0 -1
- package/storybook/public/625.4e46db89.iframe.bundle.js +0 -1
- package/storybook/public/658.22cfca07.iframe.bundle.js +0 -1
- package/storybook/public/664.a464a442.iframe.bundle.js +0 -1
- package/storybook/public/687.7bbde896.iframe.bundle.js +0 -1
- package/storybook/public/696.209eab94.iframe.bundle.js +0 -1
- package/storybook/public/713.8662e9a0.iframe.bundle.js +0 -1
- package/storybook/public/725.7f876a32.iframe.bundle.js +0 -2
- package/storybook/public/758.dae33e9e.iframe.bundle.js +0 -1
- package/storybook/public/809.7a44a691.iframe.bundle.js +0 -1
- package/storybook/public/864.8d02059a.iframe.bundle.js +0 -1
- package/storybook/public/866.0e255b9d.iframe.bundle.js +0 -1
- package/storybook/public/871.e3a780ba.iframe.bundle.js +0 -1
- package/storybook/public/907.0521c6f4.iframe.bundle.js +0 -2
- package/storybook/public/907.0521c6f4.iframe.bundle.js.LICENSE.txt +0 -1
- package/storybook/public/919.57aed125.iframe.bundle.js +0 -1
- package/storybook/public/933.e56e01a1.iframe.bundle.js +0 -1
- package/storybook/public/938.f1a4065f.iframe.bundle.js +0 -1
- package/storybook/public/952.09d50df1.iframe.bundle.js +0 -1
- package/storybook/public/97.dab9ed43.iframe.bundle.js +0 -1
- package/storybook/public/972.46b935fe.iframe.bundle.js +0 -7
- package/storybook/public/984.5ce87937.iframe.bundle.js +0 -2
- package/storybook/public/main.e89889b3.iframe.bundle.js +0 -2
- package/storybook/public/main.e89889b3.iframe.bundle.js.LICENSE.txt +0 -1
- package/storybook/public/runtime~main.01b9ad37.iframe.bundle.js +0 -1
- /package/src/gatsby-core-theme/components/{pages/body/body.module.scss → molecules/floating-area/floating-area.module.scss} +0 -0
- /package/storybook/public/{725.7f876a32.iframe.bundle.js.LICENSE.txt → 179.cf86fb79.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/public/{225.6dca798a.iframe.bundle.js.LICENSE.txt → 620.006a92ae.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/public/{984.5ce87937.iframe.bundle.js.LICENSE.txt → 780.3a6a2927.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { lazy, Suspense } from 'react';
|
|
2
2
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
5
|
-
import loadable from '@loadable/component';
|
|
6
5
|
import { getURLParam } from 'gatsby-core-theme/src/helpers/getters';
|
|
7
6
|
import Module from 'gatsby-core-theme/src/components/molecules/module';
|
|
8
7
|
|
|
@@ -10,6 +9,8 @@ import keygen from 'gatsby-core-theme/src/helpers/keygen';
|
|
|
10
9
|
import styles from 'gatsby-core-theme/src/components/molecules/main/main.module.scss';
|
|
11
10
|
import settings from 'gatsby-core-theme/src/constants/settings.mjs';
|
|
12
11
|
import FeedBackModule from '../../../../components/atoms/feedBackModule';
|
|
12
|
+
import ReviewCredits from '../../../../components/atoms/review-credits';
|
|
13
|
+
import Author from '~atoms/author';
|
|
13
14
|
import { isSearchPath } from '~helpers/isSearchPath';
|
|
14
15
|
|
|
15
16
|
const Main = ({
|
|
@@ -35,52 +36,55 @@ const Main = ({
|
|
|
35
36
|
.length;
|
|
36
37
|
|
|
37
38
|
const pathPrefixes = isSearchPath(allMarkets, page.path);
|
|
38
|
-
const SearchPage = pathPrefixes ?
|
|
39
|
+
const SearchPage = pathPrefixes ? lazy(() => import(`~pages/search`)) : null;
|
|
39
40
|
const HtmlSitemap = pageContext.sitemapData
|
|
40
|
-
?
|
|
41
|
+
? lazy(() => import(`gatsby-core-theme/src/components/atoms/sitemap`))
|
|
41
42
|
: null;
|
|
42
43
|
|
|
43
44
|
const Newsletter = showNewsletter
|
|
44
|
-
?
|
|
45
|
+
? lazy(() => import('gatsby-core-theme/src/components/molecules/newsletter'))
|
|
45
46
|
: null;
|
|
46
47
|
const NewsletterSuccess =
|
|
47
48
|
showNewsletter && typeof window !== 'undefined' && Boolean(getURLParam('subscribed'))
|
|
48
|
-
?
|
|
49
|
+
? lazy(() => import(`gatsby-core-theme/src/components/molecules/newsletter/success`))
|
|
49
50
|
: null;
|
|
50
51
|
const NotFound = page.path.includes('404')
|
|
51
|
-
?
|
|
52
|
+
? lazy(() => import(`gatsby-core-theme/src/components/atoms/not-found`))
|
|
52
53
|
: null;
|
|
54
|
+
|
|
53
55
|
const AuthorBox =
|
|
54
|
-
page.author_id && !isContactUsPage
|
|
55
|
-
|
|
56
|
+
page.author && page.author_id && !isContactUsPage
|
|
57
|
+
? lazy(() => import(`~atoms/author-box`))
|
|
58
|
+
: null;
|
|
59
|
+
|
|
60
|
+
const showReviewCredits =
|
|
56
61
|
page.path !== '/' &&
|
|
57
62
|
!isContactUsPage &&
|
|
58
63
|
page.path !== 'news' &&
|
|
59
64
|
page.path !== 'sitemap' &&
|
|
60
65
|
page.template !== 'ppc' &&
|
|
61
66
|
page.author_id &&
|
|
62
|
-
showAuthor
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const Author =
|
|
67
|
+
showAuthor;
|
|
68
|
+
|
|
69
|
+
const showAuthorComponent =
|
|
66
70
|
page.path !== '/' &&
|
|
67
71
|
!isContactUsPage &&
|
|
68
72
|
page.path !== 'news' &&
|
|
69
73
|
page.path !== 'sitemap' &&
|
|
70
74
|
page.template !== 'ppc' &&
|
|
71
75
|
page.author_id &&
|
|
72
|
-
showAuthor
|
|
73
|
-
|
|
74
|
-
: null;
|
|
76
|
+
showAuthor;
|
|
77
|
+
|
|
75
78
|
const useReviewCredits =
|
|
76
79
|
process.env.GATSBY_SITE_NAME === 'irishluck.ie' ||
|
|
77
80
|
process.env.GATSBY_SITE_NAME === 'demosite' ||
|
|
78
81
|
process.env.GATSBY_SITE_NAME === 'playcasino.co.za';
|
|
82
|
+
|
|
79
83
|
const Feedback =
|
|
80
84
|
page?.sections?.main?.feedbackCounter &&
|
|
81
85
|
!isContactUsPage &&
|
|
82
86
|
!exclFeedback &&
|
|
83
|
-
|
|
87
|
+
lazy(() => import(`../../../../components/atoms/feedback`));
|
|
84
88
|
|
|
85
89
|
const date =
|
|
86
90
|
page.manual_updated_date || page.manual_published_date
|
|
@@ -89,10 +93,19 @@ const Main = ({
|
|
|
89
93
|
|
|
90
94
|
return (
|
|
91
95
|
<main className={`${styles?.modulePage || ''} ${styles[page?.template] || ''}`}>
|
|
92
|
-
{NotFound &&
|
|
93
|
-
|
|
96
|
+
{NotFound && (
|
|
97
|
+
<Suspense fallback={<></>}>
|
|
98
|
+
<NotFound pageContext={pageContext} />
|
|
99
|
+
</Suspense>
|
|
100
|
+
)}
|
|
101
|
+
{HtmlSitemap && (
|
|
102
|
+
<Suspense fallback={<></>}>
|
|
103
|
+
<HtmlSitemap pageContext={pageContext} />
|
|
104
|
+
</Suspense>
|
|
105
|
+
)}
|
|
106
|
+
|
|
94
107
|
{useReviewCredits
|
|
95
|
-
?
|
|
108
|
+
? showReviewCredits && (
|
|
96
109
|
<ReviewCredits
|
|
97
110
|
date={date}
|
|
98
111
|
author={page?.author_id && page?.author}
|
|
@@ -102,7 +115,7 @@ const Main = ({
|
|
|
102
115
|
type={page?.template}
|
|
103
116
|
/>
|
|
104
117
|
)
|
|
105
|
-
:
|
|
118
|
+
: showAuthorComponent && (
|
|
106
119
|
<Author
|
|
107
120
|
name={page.author?.name}
|
|
108
121
|
date={date}
|
|
@@ -115,6 +128,7 @@ const Main = ({
|
|
|
115
128
|
headerOffset={174}
|
|
116
129
|
/>
|
|
117
130
|
)}
|
|
131
|
+
|
|
118
132
|
{section.modules &&
|
|
119
133
|
section.modules.map((module, index) => (
|
|
120
134
|
<Module
|
|
@@ -128,28 +142,44 @@ const Main = ({
|
|
|
128
142
|
modulePosition={index}
|
|
129
143
|
/>
|
|
130
144
|
))}
|
|
131
|
-
{SearchPage &&
|
|
145
|
+
{SearchPage && (
|
|
146
|
+
<Suspense fallback={<></>}>
|
|
147
|
+
<SearchPage page={page} />
|
|
148
|
+
</Suspense>
|
|
149
|
+
)}
|
|
132
150
|
{AuthorBox && (
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
151
|
+
<Suspense fallback={<></>}>
|
|
152
|
+
<AuthorBox
|
|
153
|
+
author={page.author}
|
|
154
|
+
page={page}
|
|
155
|
+
date={date}
|
|
156
|
+
readingTime={page.reading_time}
|
|
157
|
+
reviewer={page.reviewer_id && page?.reviewer}
|
|
158
|
+
/>
|
|
159
|
+
</Suspense>
|
|
140
160
|
)}
|
|
141
161
|
{Feedback && (
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
<Suspense fallback={<></>}>
|
|
163
|
+
<Feedback
|
|
164
|
+
trueVotes={page?.true_votes}
|
|
165
|
+
falseVotes={page?.false_votes}
|
|
166
|
+
pageId={page?.id}
|
|
167
|
+
casinoTitle={page?.relation ? page?.relation.name : page?.title}
|
|
168
|
+
operatorImg={page?.relation?.standardised_logo_url || page?.relation?.logo_url}
|
|
169
|
+
/>
|
|
170
|
+
</Suspense>
|
|
171
|
+
)}
|
|
172
|
+
{Newsletter && (
|
|
173
|
+
<Suspense fallback={<></>}>
|
|
174
|
+
<Newsletter page={page} />
|
|
175
|
+
</Suspense>
|
|
149
176
|
)}
|
|
150
|
-
{Newsletter && <Newsletter page={page} />}
|
|
151
177
|
{NewsletterSuccess && <NewsletterSuccess />}
|
|
152
|
-
{page.template !== 'ppc' && Feedback &&
|
|
178
|
+
{page.template !== 'ppc' && Feedback && (
|
|
179
|
+
<Suspense fallback={<></>}>
|
|
180
|
+
<FeedBackModule />
|
|
181
|
+
</Suspense>
|
|
182
|
+
)}
|
|
153
183
|
</main>
|
|
154
184
|
);
|
|
155
185
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
/* eslint-disable react/prop-types */
|
|
3
|
-
|
|
3
|
+
/* eslint-disable no-else-return */
|
|
4
|
+
import React, { useContext, lazy, Suspense } from 'react';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
|
-
import loadable from '@loadable/component';
|
|
6
6
|
import { anchorLink } from 'gatsby-core-theme/src/helpers/strings';
|
|
7
7
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
8
8
|
import {
|
|
@@ -10,7 +10,12 @@ import {
|
|
|
10
10
|
getSectionExtraField,
|
|
11
11
|
translate,
|
|
12
12
|
} from 'gatsby-core-theme/src/helpers/getters';
|
|
13
|
+
import Content from 'gatsby-core-theme/src/components/molecules/content';
|
|
14
|
+
import Toplist from 'gatsby-core-theme/src/components/organisms/toplist';
|
|
15
|
+
import Anchor from 'gatsby-core-theme/src/components/organisms/anchor/template-one';
|
|
16
|
+
import Cards from '../../../../components/organisms/cards';
|
|
13
17
|
import ModuleTitle from '../../atoms/module-title';
|
|
18
|
+
import InfoGrid from '../../../../components/atoms/info-grid/template-one';
|
|
14
19
|
import { getApiQueryParams } from '../../../helpers/sportstake';
|
|
15
20
|
import { removeSymbols } from '../../../../helpers/strings';
|
|
16
21
|
import { generateCustomHeadings } from '../../../helpers/lotto';
|
|
@@ -34,39 +39,31 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
34
39
|
}))(siteSchema);
|
|
35
40
|
|
|
36
41
|
const GetModuleComponent = (moduleItem) => {
|
|
37
|
-
const { items, name
|
|
42
|
+
const { items, name } = moduleItem || {};
|
|
38
43
|
|
|
39
44
|
switch (name) {
|
|
40
45
|
// Modules
|
|
41
46
|
case 'content':
|
|
42
|
-
return
|
|
47
|
+
return Content;
|
|
43
48
|
case 'top_list':
|
|
44
|
-
return
|
|
49
|
+
return Toplist;
|
|
45
50
|
case 'archive':
|
|
46
51
|
if (!items || items.length === 0) return null;
|
|
47
|
-
return
|
|
52
|
+
return lazy(() => import('gatsby-core-theme/src/components/organisms/archive'));
|
|
48
53
|
case 'counter':
|
|
49
|
-
return
|
|
54
|
+
return lazy(() => import('gatsby-core-theme/src/components/molecules/counter'));
|
|
50
55
|
case 'contact_form':
|
|
51
|
-
return
|
|
56
|
+
return lazy(() => import('gatsby-core-theme/src/components/atoms/contact-form'));
|
|
52
57
|
case 'cards':
|
|
53
|
-
return loadable(() => import('../../../../components/organisms/cards'));
|
|
54
58
|
case 'cards_v2':
|
|
55
|
-
return
|
|
59
|
+
return Cards;
|
|
56
60
|
case 'pros_and_cons':
|
|
57
|
-
return
|
|
61
|
+
return lazy(() => import('gatsby-core-theme/src/components/molecules/pros-cons'));
|
|
58
62
|
case 'accordion':
|
|
59
|
-
return
|
|
63
|
+
return lazy(() => import('gatsby-core-theme/src/components/organisms/accordion'));
|
|
60
64
|
case 'anchor':
|
|
61
65
|
if (items && items.length > 0) {
|
|
62
|
-
|
|
63
|
-
return loadable(() =>
|
|
64
|
-
import('gatsby-core-theme/src/components/organisms/anchor/template-two')
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
return loadable(() =>
|
|
68
|
-
import('gatsby-core-theme/src/components/organisms/anchor/template-one')
|
|
69
|
-
);
|
|
66
|
+
return Anchor;
|
|
70
67
|
}
|
|
71
68
|
return null;
|
|
72
69
|
case 'carousel':
|
|
@@ -74,69 +71,77 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
74
71
|
items.length > 0 && // has items
|
|
75
72
|
items.filter((item) => item.image === null).length === 0 // not filled with null items
|
|
76
73
|
) {
|
|
77
|
-
return
|
|
74
|
+
return lazy(() => import('gatsby-core-theme/src/components/organisms/carousel'));
|
|
78
75
|
}
|
|
79
76
|
return null;
|
|
80
77
|
case 'bonus':
|
|
81
|
-
return
|
|
82
|
-
import('gatsby-core-theme/src/components/molecules/bonus/template-one')
|
|
83
|
-
);
|
|
78
|
+
return lazy(() => import('gatsby-core-theme/src/components/molecules/bonus/template-one'));
|
|
84
79
|
case 'image':
|
|
85
|
-
return
|
|
80
|
+
return lazy(() => import('gatsby-core-theme/src/components/atoms/image'));
|
|
86
81
|
case 'spotlights':
|
|
87
|
-
if (
|
|
88
|
-
|
|
82
|
+
if (module?.mode === 'image_text') {
|
|
83
|
+
if (module?.style === 'template_two') {
|
|
84
|
+
return lazy(() => import('~molecules/spotlights_v2/image-text/template-two'));
|
|
85
|
+
} else if (module?.style === 'template_three') {
|
|
86
|
+
return lazy(() => import('~molecules/spotlights_v2/image-text/template-three'));
|
|
87
|
+
}
|
|
88
|
+
return lazy(() => import('~molecules/spotlights_v2/image-text/template-one'));
|
|
89
|
+
} else if (module?.mode === 'icon') {
|
|
90
|
+
return lazy(() => import('~molecules/spotlights_v2/icon/template-one'));
|
|
91
|
+
} else if (module?.mode === 'image') {
|
|
92
|
+
if (module?.style === 'template_two') {
|
|
93
|
+
return lazy(() => import('~molecules/spotlights_v2/image/template-two'));
|
|
94
|
+
}
|
|
95
|
+
return lazy(() => import('~molecules/spotlights_v2/image/template-one'));
|
|
89
96
|
}
|
|
90
|
-
return
|
|
91
|
-
|
|
97
|
+
return null;
|
|
92
98
|
case 'faq':
|
|
93
99
|
// eslint-disable-next-line react/destructuring-assignment
|
|
94
100
|
if (moduleItem?.display_front_end === '1') {
|
|
95
|
-
return
|
|
101
|
+
return lazy(() => import('../../../../components/molecules/faq'));
|
|
96
102
|
}
|
|
97
103
|
return null;
|
|
98
104
|
// Template blocks
|
|
99
105
|
case 'horse_racing_calculator':
|
|
100
|
-
return
|
|
106
|
+
return lazy(() => import('../../../../components/molecules/horse-calculator'));
|
|
101
107
|
case 'review_summary':
|
|
102
|
-
return
|
|
108
|
+
return lazy(() => import('../../../../components/molecules/operator-summary'));
|
|
103
109
|
case 'game_iframe':
|
|
104
110
|
case 'iframe':
|
|
105
111
|
if (moduleItem?.value_type === 'template_block') {
|
|
106
|
-
return
|
|
112
|
+
return lazy(() => import('../../../../components/molecules/game-iframe'));
|
|
107
113
|
}
|
|
108
|
-
return
|
|
109
|
-
// Template blocks
|
|
114
|
+
return lazy(() => import('gatsby-core-theme/src/components/atoms/iframe'));
|
|
110
115
|
case 'info_grid':
|
|
111
116
|
case 'information_grid':
|
|
112
117
|
case 'operator_information_block':
|
|
113
118
|
if (getSectionExtraField(null, page, 'operator_is_placeholder') === '1') {
|
|
114
119
|
return null;
|
|
115
120
|
}
|
|
116
|
-
return
|
|
121
|
+
return InfoGrid;
|
|
117
122
|
case 'content_box':
|
|
118
|
-
return
|
|
123
|
+
return lazy(() => import('gatsby-core-theme/src/components/atoms/content-box'));
|
|
119
124
|
case 'timeline':
|
|
120
|
-
return
|
|
125
|
+
return lazy(() =>
|
|
121
126
|
import('gatsby-core-theme/src/components/molecules/content-and-custom-module')
|
|
122
127
|
);
|
|
123
128
|
case 'welcome_bonus':
|
|
124
|
-
return
|
|
129
|
+
return lazy(() => import('../../../../components/molecules/operator-welcome-bonus'));
|
|
125
130
|
case 'widget':
|
|
126
|
-
return
|
|
131
|
+
return lazy(() => import('../../../../components/molecules/widget'));
|
|
127
132
|
case 'score_gauges':
|
|
128
|
-
return
|
|
133
|
+
return lazy(() => import('../../../../components/molecules/game-score-gauge'));
|
|
129
134
|
case 'site_contacts':
|
|
130
135
|
if (page?.siteSchema?.email === null) {
|
|
131
136
|
return null;
|
|
132
137
|
}
|
|
133
|
-
return
|
|
138
|
+
return lazy(() => import('../../../../components/atoms/site-contacts'));
|
|
134
139
|
case 'newsletter_optin':
|
|
135
|
-
return
|
|
140
|
+
return lazy(() => import('../../../../components/molecules/newsletter-optin'));
|
|
136
141
|
case 'wagering_calculator':
|
|
137
|
-
return
|
|
142
|
+
return lazy(() => import('../../../../components/molecules/wagering-calculator'));
|
|
138
143
|
case 'social_icons':
|
|
139
|
-
return
|
|
144
|
+
return lazy(() => import('../../../../components/atoms/social-icons'));
|
|
140
145
|
case 'sportstake4fixturesmidweek':
|
|
141
146
|
case 'sportstake8fixturesmidweek':
|
|
142
147
|
case 'sportstake8fixturesweekend':
|
|
@@ -145,7 +150,7 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
145
150
|
case 'sportstakecricketfixturesweekend':
|
|
146
151
|
case 'sportstakerugbyfixturesweekend':
|
|
147
152
|
if (!serverData?.fixtures?.data?.find((x) => x?.name === module?.name)) return;
|
|
148
|
-
return
|
|
153
|
+
return lazy(() => import('../../../../components/molecules/sportstake/fixtures'));
|
|
149
154
|
case 'sportstake4resultsmidweek':
|
|
150
155
|
case 'sportstake8resultsmidweek':
|
|
151
156
|
case 'sportstake8resultsweekend':
|
|
@@ -154,14 +159,14 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
154
159
|
case 'sportstakecricketresultsweekend':
|
|
155
160
|
case 'sportstakerugbyresultsweekend':
|
|
156
161
|
if (!serverData?.results?.data?.find((x) => x?.name === module?.name)) return;
|
|
157
|
-
return
|
|
162
|
+
return lazy(() => import('../../../../components/molecules/sportstake/results'));
|
|
158
163
|
case 'lotto':
|
|
159
164
|
case 'daily_lotto':
|
|
160
165
|
case 'powerball':
|
|
161
166
|
if (!serverData?.lotto?.data?.find((x) => x?.name === module?.name)) return;
|
|
162
|
-
return
|
|
167
|
+
return lazy(() => import('../../../../components/molecules/sportstake/lotto-module'));
|
|
163
168
|
case 'newsletter':
|
|
164
|
-
return
|
|
169
|
+
return lazy(() => import('gatsby-core-theme/src/components/molecules/newsletter'));
|
|
165
170
|
default:
|
|
166
171
|
return null;
|
|
167
172
|
}
|
|
@@ -261,11 +266,37 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
261
266
|
'--module-background-color': module.background_color,
|
|
262
267
|
};
|
|
263
268
|
|
|
264
|
-
const
|
|
269
|
+
const showModuleIntro =
|
|
265
270
|
module.name !== 'top_list' &&
|
|
266
271
|
module.module_introduction &&
|
|
267
|
-
module.module_introduction !== '<p></p>'
|
|
268
|
-
|
|
272
|
+
module.module_introduction !== '<p></p>';
|
|
273
|
+
|
|
274
|
+
const useSuspense = [
|
|
275
|
+
'cards_v2',
|
|
276
|
+
'content',
|
|
277
|
+
'top_list',
|
|
278
|
+
'anchor',
|
|
279
|
+
'info_grid',
|
|
280
|
+
'information_grid',
|
|
281
|
+
'operator_information_block',
|
|
282
|
+
];
|
|
283
|
+
|
|
284
|
+
const isSportsStake = [
|
|
285
|
+
'sportstake4resultsmidweek',
|
|
286
|
+
'sportstake8resultsmidweek',
|
|
287
|
+
'sportstake8resultsweekend',
|
|
288
|
+
'sportstake13resultsmidweek',
|
|
289
|
+
'sportstake13resultsweekend',
|
|
290
|
+
'sportstakecricketresultsweekend',
|
|
291
|
+
'sportstakerugbyresultsweekend',
|
|
292
|
+
'sportstake4fixturesmidweek',
|
|
293
|
+
'sportstake8fixturesmidweek',
|
|
294
|
+
'sportstake8fixturesweekend',
|
|
295
|
+
'sportstake13fixturesmidweek',
|
|
296
|
+
'sportstake13fixturesweekend',
|
|
297
|
+
'sportstakecricketfixturesweekend',
|
|
298
|
+
'sportstakerugbyfixturesweekend',
|
|
299
|
+
];
|
|
269
300
|
|
|
270
301
|
return (
|
|
271
302
|
ModuleComponent && (
|
|
@@ -278,7 +309,7 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
278
309
|
style={module.background_color && moduleBackgroundColor}
|
|
279
310
|
className={`${styles[moduleClassName] !== undefined ? styles[moduleClassName] || '' : ''} ${
|
|
280
311
|
module?.name || ''
|
|
281
|
-
} ${
|
|
312
|
+
} ${showModuleIntro ? '' : styles.noModuleIntro} ${styles?.module || ''} ${
|
|
282
313
|
module?.style ? styles[module.style] || '' : ''
|
|
283
314
|
} module ${homepageFirstModule ? styles?.isHomepageFirstModule || '' : ''}`}
|
|
284
315
|
>
|
|
@@ -291,8 +322,8 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
291
322
|
anchorLabel={module.name === 'archive' && anchorLabel}
|
|
292
323
|
/>
|
|
293
324
|
)}
|
|
294
|
-
{
|
|
295
|
-
<
|
|
325
|
+
{showModuleIntro && (
|
|
326
|
+
<Content
|
|
296
327
|
isModuleIntroduction={module.module_introduction}
|
|
297
328
|
module={{ value: module.module_introduction }}
|
|
298
329
|
isHomepageFirstModule={homepageFirstModule}
|
|
@@ -300,16 +331,37 @@ const Modules = ({ module, pageContext, index, exclOperator, serverData }) => {
|
|
|
300
331
|
)}
|
|
301
332
|
</>
|
|
302
333
|
)}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
334
|
+
{useSuspense.includes(module.name) ? (
|
|
335
|
+
<ModuleComponent
|
|
336
|
+
module={module}
|
|
337
|
+
page={page}
|
|
338
|
+
pageContext={pageContext}
|
|
339
|
+
noModuleIntro={!showModuleIntro}
|
|
340
|
+
{...extraProps()}
|
|
341
|
+
exclOperator={exclOperator}
|
|
342
|
+
isHomepageFirstModule={homepageFirstModule}
|
|
343
|
+
/>
|
|
344
|
+
) : (
|
|
345
|
+
<Suspense
|
|
346
|
+
fallback={
|
|
347
|
+
<div
|
|
348
|
+
className={`${
|
|
349
|
+
isSportsStake.includes(module.name) ? styles.sportstake : styles[module.name]
|
|
350
|
+
}`}
|
|
351
|
+
/>
|
|
352
|
+
}
|
|
353
|
+
>
|
|
354
|
+
<ModuleComponent
|
|
355
|
+
module={module}
|
|
356
|
+
page={page}
|
|
357
|
+
pageContext={pageContext}
|
|
358
|
+
noModuleIntro={!showModuleIntro}
|
|
359
|
+
{...extraProps()}
|
|
360
|
+
exclOperator={exclOperator}
|
|
361
|
+
isHomepageFirstModule={homepageFirstModule}
|
|
362
|
+
/>
|
|
363
|
+
</Suspense>
|
|
364
|
+
)}
|
|
313
365
|
</div>
|
|
314
366
|
)
|
|
315
367
|
);
|
|
@@ -3,9 +3,11 @@ import React, { useState, useEffect, useRef, useCallback, useContext } from 'rea
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { navigate } from 'gatsby';
|
|
5
5
|
import { FaSearch } from '@react-icons/all-files/fa/FaSearch';
|
|
6
|
-
import loadable from '@loadable/component';
|
|
7
6
|
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
8
7
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
8
|
+
import Tabs from 'gatsby-core-theme/src/hooks/tabs';
|
|
9
|
+
import CustomSelect from '~atoms/custom-select';
|
|
10
|
+
import Archive from '~organisms/archive';
|
|
9
11
|
import loadingImg from '../../../../images/loading.svg';
|
|
10
12
|
import LazyImage from '~hooks/lazy-image';
|
|
11
13
|
import ConditionalWrapper from '~atoms/conditional-wrapper';
|
|
@@ -236,7 +238,6 @@ const Search = ({
|
|
|
236
238
|
}
|
|
237
239
|
}, [pageSearchOptionsCopy]);
|
|
238
240
|
if (pageSearchOptionsCopy !== null && pageSearchOptionsCopy.sort !== undefined) {
|
|
239
|
-
const CustomSelect = loadable(() => import('~atoms/custom-select'));
|
|
240
241
|
pageSearchOptionsCopy.tabsOptions.HeaderComp = (
|
|
241
242
|
<div className={styles.selectwrapper}>
|
|
242
243
|
<CustomSelect
|
|
@@ -276,10 +277,6 @@ const Search = ({
|
|
|
276
277
|
);
|
|
277
278
|
}
|
|
278
279
|
|
|
279
|
-
const Tabs =
|
|
280
|
-
searchResultsRef.current.length !== 0 &&
|
|
281
|
-
loadable(() => import('gatsby-core-theme/src/hooks/tabs'));
|
|
282
|
-
|
|
283
280
|
return (
|
|
284
281
|
<>
|
|
285
282
|
{formSearchOptionsCopy !== null && (
|
|
@@ -403,8 +400,6 @@ const Search = ({
|
|
|
403
400
|
|
|
404
401
|
if (items.length === 0) return null;
|
|
405
402
|
|
|
406
|
-
const Archive = loadable(() => import('~organisms/archive'));
|
|
407
|
-
|
|
408
403
|
return (
|
|
409
404
|
<div
|
|
410
405
|
results={items?.items?.length}
|
package/src/gatsby-core-theme/components/organisms/cookie-consent/cookie-consent.module.scss
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
@include min(tablet) {
|
|
17
17
|
padding: var(--cookie-consent-desktop-padding, 1.6rem 2.4rem 2.4rem);
|
|
18
18
|
}
|
|
19
|
+
display: none;
|
|
19
20
|
|
|
20
21
|
> div {
|
|
21
22
|
@include flex-align(flex-start, space-between);
|
|
@@ -141,3 +142,7 @@
|
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
}
|
|
145
|
+
|
|
146
|
+
.show {
|
|
147
|
+
display: block;
|
|
148
|
+
}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import
|
|
5
|
+
import Title from 'gatsby-matrix-theme/src/gatsby-core-theme/hooks/tabs/title';
|
|
6
6
|
import keygen from '~helpers/keygen';
|
|
7
7
|
import List from './list';
|
|
8
8
|
import styles from './toplist.module.scss';
|
|
9
|
+
import Tabs from '~hooks/tabs';
|
|
10
|
+
import ModuleIntroduction from '~molecules/content';
|
|
9
11
|
import AffiliateDisclaimer from '../../../../components/atoms/affiliate-disclaimer';
|
|
10
12
|
|
|
11
13
|
const TopList = ({
|
|
@@ -40,13 +42,8 @@ const TopList = ({
|
|
|
40
42
|
</div>
|
|
41
43
|
));
|
|
42
44
|
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
!showTabs &&
|
|
46
|
-
(module.title || module.module_title) &&
|
|
47
|
-
loadable(() => import('gatsby-matrix-theme/src/gatsby-core-theme/hooks/tabs/title'));
|
|
48
|
-
const ModuleIntro =
|
|
49
|
-
!showTabs && module.module_introduction && loadable(() => import('~molecules/content'));
|
|
45
|
+
const showTitle = !showTabs && (module.title || module.module_title);
|
|
46
|
+
const showModuleIntro = !showTabs && module.module_introduction;
|
|
50
47
|
|
|
51
48
|
return showTabs ? (
|
|
52
49
|
<Tabs
|
|
@@ -63,7 +60,7 @@ const TopList = ({
|
|
|
63
60
|
</Tabs>
|
|
64
61
|
) : (
|
|
65
62
|
<>
|
|
66
|
-
{
|
|
63
|
+
{showTitle && (
|
|
67
64
|
<div className={`${styles?.tabsHeader || ''} ${styles?.titleAndTab || ''}`}>
|
|
68
65
|
<Title
|
|
69
66
|
module={module}
|
|
@@ -73,8 +70,8 @@ const TopList = ({
|
|
|
73
70
|
{showAffiliateDisclaimer && <AffiliateDisclaimer className={styles.disclaimer} />}
|
|
74
71
|
</div>
|
|
75
72
|
)}
|
|
76
|
-
{
|
|
77
|
-
<
|
|
73
|
+
{showModuleIntro && (
|
|
74
|
+
<ModuleIntroduction
|
|
78
75
|
module={{ value: module.module_introduction }}
|
|
79
76
|
isHomepageFirstModule={isHomepageFirstModule}
|
|
80
77
|
/>
|