gatsby-core-theme 20.0.1 → 20.0.3

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,27 @@
1
+ ## [20.0.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v20.0.2...v20.0.3) (2023-04-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * preview operator review pages ([98d853f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/98d853f0bbead6363014459ebbbc254c7f1a2be4))
7
+ * preview operator review pages ([094954d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/094954df51989e44b52513523d050e100d7523a7))
8
+
9
+ ## [20.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v20.0.1...v20.0.2) (2023-04-13)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * fix for tnc issue on matrix ([b0fe49e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b0fe49e5d344aad42b311e343ee1c5e2b697ad37))
15
+
16
+
17
+ ### Code Refactoring
18
+
19
+ * correction to tnc props ([6ea3616](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6ea3616ef5fcf5dad80801a130971ea50cd7ded6))
20
+ * update page.relation check in processor ([ab92c2d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ab92c2d78808d06eb4fa40aa94332d4194587b8b))
21
+
22
+
23
+ * Merge branch 'tm-tnc-issue' into 'master' ([d29e1aa](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d29e1aab514b494197ab1f305e308d03ce776e9a))
24
+
1
25
  ## [20.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v20.0.0...v20.0.1) (2023-04-12)
2
26
 
3
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "20.0.1",
3
+ "version": "20.0.3",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -110,7 +110,7 @@ export default function AuthorBox({
110
110
  <div
111
111
  ref={biographyRef}
112
112
  className={`${styles.biography} ${
113
- author?.biography.split(' ').length > 30 && styles.showReadMore
113
+ author?.biography?.split(' ').length > 30 && styles.showReadMore
114
114
  }`}
115
115
  role="button"
116
116
  onClick={toggleReadMore}
@@ -119,7 +119,7 @@ export default function AuthorBox({
119
119
  tabIndex={0}
120
120
  dangerouslySetInnerHTML={{
121
121
  __html:
122
- author?.biography.split(' ').length > 30 && isReadMore
122
+ author?.biography?.split(' ').length > 30 && isReadMore
123
123
  ? `${textWordsLimit(author?.biography, 30)} <span class='${
124
124
  styles.contReadText
125
125
  }'>...${translate(translations, 'cont_read', 'continue reading')}</span>`
@@ -1,16 +1,4 @@
1
1
  .collapseContainer {
2
- .buttonM {
3
- @include max(tablet) {
4
- display: block;
5
- }
6
- }
7
-
8
- .buttonD {
9
- @include min(tablet) {
10
- display: block;
11
- }
12
- }
13
-
14
2
  .button {
15
3
  display: none;
16
4
  position: relative;
@@ -23,6 +11,18 @@
23
11
  left: 115%;
24
12
  top: 42%;
25
13
  }
14
+
15
+ &.buttonM {
16
+ @include max(tablet) {
17
+ display: block;
18
+ }
19
+ }
20
+
21
+ &.buttonD {
22
+ @include min(tablet) {
23
+ display: block;
24
+ }
25
+ }
26
26
  }
27
27
 
28
28
  .active {
@@ -6,8 +6,8 @@ import Collapse from '~atoms/collapse';
6
6
 
7
7
  const Tnc = ({
8
8
  hasCollapse = true,
9
- onlyMobile,
10
- onlyDesktop,
9
+ onlyMobile = true,
10
+ onlyDesktop = true,
11
11
  buttonText = 'Terms and Conditions Apply',
12
12
  contentText = '18+ New Players only. Play responsibly.',
13
13
  initOpen = false,
@@ -143,8 +143,8 @@ export const Default = Template.bind({});
143
143
  Default.args = {
144
144
  hasCollapse: true,
145
145
  contentText: tncText,
146
- onlyMobile: false,
147
- onlyDesktop: false,
146
+ onlyMobile: true,
147
+ onlyDesktop: true,
148
148
  buttonText: 'Terms and Conditions Apply',
149
149
  initOpen: false,
150
150
  isFixed: false,
@@ -259,13 +259,13 @@ export default {
259
259
  prefilledMarketModules = data.prefilled_market_modules || {};
260
260
  prefilledMarketModulesRaw = cloneDeep(data.prefilled_market_modules);
261
261
  Object.keys(transformedPages[market]).forEach((pageType) => {
262
- transformedPages[market][pageType].forEach((page, index) => {
262
+ transformedPages[market][pageType].forEach(async (page, index) => {
263
263
  // process page extra fields
264
264
  page.extra_fields && processExtraFields(page.extra_fields);
265
265
  updatePlaceholders(page, data);
266
266
 
267
267
  // set page relation
268
- processRelations(page, pageType, transformedPages, market, data, index);
268
+ await processRelations(page, pageType, transformedPages, market, data, index);
269
269
 
270
270
  // add author object to page
271
271
  if (page.author_id !== null && data.authors[page.author_id]) {
@@ -354,7 +354,12 @@ export default {
354
354
  cloneDeep(prefilledMarketModules[item.value_id])
355
355
  );
356
356
  } else {
357
- if (checkForInactiveOperatorToplist(item, page.relation.status)) return;
357
+ if (
358
+ transformedPages[market][pageType][index].relation &&
359
+ checkForInactiveOperatorToplist(item, page.relation.status)
360
+ )
361
+ return;
362
+
358
363
  res === 'pre_main_operators'
359
364
  ? page.sections.main.modules.unshift(cloneDeep(item))
360
365
  : page.sections.main.modules.push(cloneDeep(item));
@@ -9,7 +9,7 @@ export const processRelations = (page, pageType, transformedPages, market, data,
9
9
  switch (page.relation_type) {
10
10
  // Add path for payment page from payment method
11
11
  case 'operator':
12
- if (hasRelation) {
12
+ if (page.relation && hasRelation) {
13
13
  // eslint-disable-next-line camelcase, prefer-const
14
14
  const { ribbons, extra_fields, bonus } = page.relation;
15
15
  bonus &&