gatsby-core-theme 44.10.0 → 44.10.11

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.
Files changed (47) hide show
  1. package/.ci.yml +1 -0
  2. package/CHANGELOG.md +97 -0
  3. package/gatsby-config.js +3 -3
  4. package/gatsby-node.mjs +1 -0
  5. package/package.json +1 -1
  6. package/src/components/app-ssr.js +16 -18
  7. package/src/components/atoms/admin/bar/index.js +6 -2
  8. package/src/components/atoms/admin/button/index.js +4 -3
  9. package/src/components/atoms/contact-form/index.js +2 -2
  10. package/src/components/atoms/market-dropdown/index.js +7 -9
  11. package/src/components/atoms/notifications/index.js +2 -3
  12. package/src/components/atoms/ratings/index.js +7 -6
  13. package/src/components/atoms/review-link/index.js +16 -11
  14. package/src/components/atoms/search/autocomplete/article/index.js +13 -9
  15. package/src/components/atoms/search/autocomplete/default/index.js +13 -9
  16. package/src/components/atoms/search/autocomplete/game/index.js +22 -12
  17. package/src/components/atoms/search/autocomplete/operator/index.js +26 -18
  18. package/src/components/molecules/bonus/template-one/index.js +15 -2
  19. package/src/components/molecules/bonus/template-two/index.js +7 -1
  20. package/src/components/molecules/cookie-modal/index.js +1 -1
  21. package/src/components/molecules/floating-area/index.js +6 -12
  22. package/src/components/molecules/footer/index.js +35 -27
  23. package/src/components/molecules/footer/variants/template-one/template-one.stories.js +70 -67
  24. package/src/components/molecules/footer/variants/template-one/template-one.test.js +92 -69
  25. package/src/components/molecules/footer/variants/template-three/template-three.stories.js +4 -4
  26. package/src/components/molecules/footer/variants/template-three/template-three.test.js +98 -73
  27. package/src/components/molecules/footer/variants/template-two/template-two.stories.js +3 -3
  28. package/src/components/molecules/footer/variants/template-two/template-two.test.js +96 -73
  29. package/src/components/molecules/header/variants/default/template-one/index.js +15 -13
  30. package/src/components/molecules/header/variants/default/template-one/template-one.test.js +37 -29
  31. package/src/components/molecules/header/variants/slot/template-one/templateone.test.js +32 -29
  32. package/src/components/molecules/leave-comment-form/index.js +90 -79
  33. package/src/components/molecules/main/index.js +5 -7
  34. package/src/components/molecules/menu/index.js +28 -30
  35. package/src/components/molecules/newsletter/form/index.js +2 -2
  36. package/src/components/molecules/newsletter/index.js +23 -19
  37. package/src/components/molecules/tnc/index.js +4 -2
  38. package/src/components/organisms/anchor/template-two/index.js +33 -18
  39. package/src/components/organisms/footer-navigation/index.js +10 -9
  40. package/src/components/organisms/navigation/index.js +12 -19
  41. package/src/constants/ratings-constant.js +7 -9
  42. package/src/helpers/getters.mjs +3 -3
  43. package/src/helpers/processImageNode.js +38 -30
  44. package/src/helpers/processImageNode.test.js +33 -24
  45. package/src/helpers/replaceMedia.js +2 -2
  46. package/src/resolver/games.mjs +1 -1
  47. package/src/resolver/operators.mjs +23 -13
@@ -1,94 +1,105 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
2
  /* eslint-disable jsx-a11y/click-events-have-key-events */
3
3
  /* eslint-disable import/no-extraneous-dependencies */
4
- import React from 'react';
5
- import Form from "gatsby-core-theme/src/components/organisms/form";
6
- import PropTypes from 'prop-types';
7
- import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
8
- import { commentForm, replyForm } from '../../../constants/forms';
4
+ import React from "react";
5
+ import PropTypes from "prop-types";
6
+ import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight";
7
+ import Form from "~organisms/form";
8
+ import { commentForm, replyForm } from "../../../constants/forms";
9
9
 
10
10
  const LeaveCommentForm = ({
11
- page,
12
- isReply = false,
13
- parentCommentID = 0,
14
- showLabels = true,
15
- showButtonIcon = false,
16
- buttonLabel = 'Add Comment',
17
- successMessage = 'Comment Submitted for Approval',
18
- failMessage = 'Comment Not Added',
19
- validationMessage = 'Fill all required fields',
20
- buttonIcon = <FaArrowRight fontSize={20} title="Right-pointing Arrow Icon" />,
21
- titleTag = 'h2',
11
+ page,
12
+ isReply = false,
13
+ parentCommentID = 0,
14
+ showLabels = true,
15
+ showButtonIcon = false,
16
+ buttonLabel = "Add Comment",
17
+ successMessage = "Comment Submitted for Approval",
18
+ failMessage = "Comment Not Added",
19
+ validationMessage = "Fill all required fields",
20
+ buttonIcon = <FaArrowRight fontSize={20} title="Right-pointing Arrow Icon" />,
21
+ titleTag = "h2",
22
22
  }) => {
23
- const activeMarket = page?.market;
24
- const isDev = process.env.NODE_ENV === 'development';
23
+ const activeMarket = page?.market;
24
+ const isDev = process.env.NODE_ENV === "development";
25
25
 
26
- const customSubmit = (form, resetForm) => {
27
- const formData = new FormData(form);
28
- const data = Object.fromEntries(formData.entries());
29
- const cleanedData = isReply
30
- ? Object.entries(data).reduce((acc, [key, value]) => {
31
- if (key.startsWith('post_anonymously_')) acc.post_anonymously = value;
32
- else if (key.startsWith('tnc_')) acc.tnc = value;
33
- else acc[key] = value;
34
- return acc;
35
- }, {})
36
- : data;
37
-
38
-
39
- if((cleanedData?.["g-recaptcha-response"] === '' || !cleanedData?.tnc) && !isDev) return;
40
-
41
- if(parentCommentID) cleanedData.parent_id = parentCommentID;
26
+ const customSubmit = (form, resetForm) => {
27
+ const formData = new FormData(form);
28
+ const data = Object.fromEntries(formData.entries());
29
+ const cleanedData = isReply
30
+ ? Object.entries(data).reduce((acc, [key, value]) => {
31
+ if (key.startsWith("post_anonymously_")) acc.post_anonymously = value;
32
+ else if (key.startsWith("tnc_")) acc.tnc = value;
33
+ else acc[key] = value;
34
+ return acc;
35
+ }, {})
36
+ : data;
42
37
 
43
- cleanedData.reference_id = page?.id;
44
- cleanedData.site_id = parseInt(process.env.SITE_ID);
45
- cleanedData.rate = parseInt(data.rate);
38
+ if (
39
+ (cleanedData?.["g-recaptcha-response"] === "" || !cleanedData?.tnc) &&
40
+ !isDev
41
+ )
42
+ return;
46
43
 
47
- cleanedData.market_short_code = activeMarket;
48
-
49
- if(!cleanedData?.post_anonymously) cleanedData.author_name = cleanedData?.name;
50
- if(!cleanedData?.rate) delete cleanedData?.rate;
44
+ if (parentCommentID) cleanedData.parent_id = parentCommentID;
51
45
 
52
- delete cleanedData?.post_anonymously;
53
- delete cleanedData?.tnc;
46
+ cleanedData.reference_id = page?.id;
47
+ cleanedData.site_id = parseInt(process.env.SITE_ID);
48
+ cleanedData.rate = parseInt(data.rate);
54
49
 
55
- return new Promise((resolve, reject) => {
56
- fetch(`${process.env.GATSBY_API_COMMENT_URL}/api/post-comment`, {
57
- method: 'POST',
58
- headers: {
59
- 'Content-Type': 'application/json',
60
- },
61
- body: JSON.stringify(cleanedData),
62
- })
63
- .then(async (response) => {
64
- if (response.ok) {
65
- resetForm();
66
- resolve(response);
67
- } else {
68
- const errorData = await response.json().catch(() => ({}));
69
- reject(errorData?.errors?.join() || response.statusText);
70
- }
71
- })
72
- .catch((error) => reject(error.message));
73
- });
74
- };
50
+ cleanedData.market_short_code = activeMarket;
75
51
 
76
- return activeMarket &&
77
- <Form
78
- formOptions={isReply ? (replyForm[activeMarket] || replyForm.default) : (commentForm[activeMarket] || commentForm.default)}
79
- showLabels={showLabels}
80
- hasButton
81
- showButtonIcon={showButtonIcon}
82
- buttonLabel={buttonLabel}
83
- customeSubmit={customSubmit}
84
- successMessage={successMessage}
85
- failMessage={failMessage}
86
- validationMessage={validationMessage}
87
- path={page?.path}
88
- buttonIcon={buttonIcon}
89
- titleType={titleTag}
90
- customClass='commentForm'
91
- />
52
+ if (!cleanedData?.post_anonymously)
53
+ cleanedData.author_name = cleanedData?.name;
54
+ if (!cleanedData?.rate) delete cleanedData?.rate;
55
+
56
+ delete cleanedData?.post_anonymously;
57
+ delete cleanedData?.tnc;
58
+
59
+ return new Promise((resolve, reject) => {
60
+ fetch(`${process.env.GATSBY_API_COMMENT_URL}/api/post-comment`, {
61
+ method: "POST",
62
+ headers: {
63
+ "Content-Type": "application/json",
64
+ },
65
+ body: JSON.stringify(cleanedData),
66
+ })
67
+ .then(async (response) => {
68
+ if (response.ok) {
69
+ resetForm();
70
+ resolve(response);
71
+ } else {
72
+ const errorData = await response.json().catch(() => ({}));
73
+ reject(errorData?.errors?.join() || response.statusText);
74
+ }
75
+ })
76
+ .catch((error) => reject(error.message));
77
+ });
78
+ };
79
+
80
+ return (
81
+ activeMarket && (
82
+ <Form
83
+ formOptions={
84
+ isReply
85
+ ? replyForm[activeMarket] || replyForm.default
86
+ : commentForm[activeMarket] || commentForm.default
87
+ }
88
+ showLabels={showLabels}
89
+ hasButton
90
+ showButtonIcon={showButtonIcon}
91
+ buttonLabel={buttonLabel}
92
+ customeSubmit={customSubmit}
93
+ successMessage={successMessage}
94
+ failMessage={failMessage}
95
+ validationMessage={validationMessage}
96
+ path={page?.path}
97
+ buttonIcon={buttonIcon}
98
+ titleType={titleTag}
99
+ customClass="commentForm"
100
+ />
101
+ )
102
+ );
92
103
  };
93
104
 
94
105
  LeaveCommentForm.propTypes = {
@@ -1,6 +1,6 @@
1
1
  import React, { lazy, Suspense } from "react";
2
2
  import PropTypes from "prop-types";
3
- import { getURLParam } from "gatsby-core-theme/src/helpers/getters";
3
+ import { getURLParam } from "~helpers/getters";
4
4
  import Module from "~molecules/module";
5
5
  import styles from "./main.module.scss";
6
6
  import keygen from "~helpers/keygen";
@@ -29,7 +29,8 @@ const Main = ({
29
29
  ) ||
30
30
  exclNewsletter
31
31
  ) && !process.env?.HIDE_NEWSLETTER;
32
- const pathPrefixes = isSearchPath(allMarkets, page.path) || page.template === "search";
32
+ const pathPrefixes =
33
+ isSearchPath(allMarkets, page.path) || page.template === "search";
33
34
  const HtmlSitemap = pageContext.sitemapData
34
35
  ? lazy(() => import(`~atoms/sitemap`))
35
36
  : null;
@@ -37,7 +38,7 @@ const Main = ({
37
38
  const NotFound = page?.path?.includes("404")
38
39
  ? lazy(() => import(`~atoms/not-found`))
39
40
  : null;
40
-
41
+
41
42
  const Newsletter = showNewsletter
42
43
  ? lazy(() => import("~molecules/newsletter"))
43
44
  : null;
@@ -83,10 +84,7 @@ const Main = ({
83
84
  />
84
85
  )}
85
86
  {pathPrefixes && (
86
- <Search
87
- serverData={serverData}
88
- pageContext={pageContext}
89
- />
87
+ <Search serverData={serverData} pageContext={pageContext} />
90
88
  )}
91
89
  {Newsletter && (
92
90
  <Suspense fallback={<></>}>
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable arrow-body-style */
2
2
  import React, { useContext, useRef } from "react";
3
3
  import PropTypes from "prop-types";
4
- import MegaItems from 'gatsby-core-theme/src/components/atoms/menu/mega-items';
5
- import Items from 'gatsby-core-theme/src/components/atoms/menu/items';
4
+ import MegaItems from "~atoms/menu/mega-items";
5
+ import Items from "~atoms/menu/items";
6
6
 
7
7
  import MenuIcon from "~atoms/menu/menu-icon";
8
8
  import { NavigationContext } from "~organisms/navigation/navigationContext";
@@ -22,10 +22,10 @@ const Menu = ({
22
22
  mobileAnimation = "collapseFull",
23
23
  stopScrollOnOpen = true,
24
24
  canOpenAllSubMenus = true,
25
- enableMegaMenu = false
25
+ enableMegaMenu = false,
26
26
  }) => {
27
27
  let menuObject;
28
-
28
+
29
29
  const currentPagePath = pageContext?.page?.path;
30
30
 
31
31
  const menuListRef = useRef(React.createRef());
@@ -73,30 +73,28 @@ const Menu = ({
73
73
  {menuObject &&
74
74
  menuObject?.children?.map((child) => {
75
75
  const level = 1;
76
- return (
77
- enableMegaMenu ? (
78
- <MegaItems
79
- toplist={toplistModule}
80
- menuListRef={menuListRef}
81
- gtmClass={gtmClass}
82
- key={keygen()}
83
- item={child}
84
- canOpenAllSubMenus={canOpenAllSubMenus}
85
- level={level}
86
- />
87
- ) : (
88
- <Items
89
- currentPage={currentPagePath}
90
- toplist={toplistModule}
91
- menuListRef={menuListRef}
92
- orientation={orientation}
93
- gtmClass={gtmClass}
94
- key={keygen()}
95
- item={child}
96
- canOpenAllSubMenus={canOpenAllSubMenus}
97
- level={level}
98
- />
99
- )
76
+ return enableMegaMenu ? (
77
+ <MegaItems
78
+ toplist={toplistModule}
79
+ menuListRef={menuListRef}
80
+ gtmClass={gtmClass}
81
+ key={keygen()}
82
+ item={child}
83
+ canOpenAllSubMenus={canOpenAllSubMenus}
84
+ level={level}
85
+ />
86
+ ) : (
87
+ <Items
88
+ currentPage={currentPagePath}
89
+ toplist={toplistModule}
90
+ menuListRef={menuListRef}
91
+ orientation={orientation}
92
+ gtmClass={gtmClass}
93
+ key={keygen()}
94
+ item={child}
95
+ canOpenAllSubMenus={canOpenAllSubMenus}
96
+ level={level}
97
+ />
100
98
  );
101
99
  })}
102
100
  </ul>
@@ -107,8 +105,8 @@ const Menu = ({
107
105
  Menu.propTypes = {
108
106
  pageContext: PropTypes.shape({
109
107
  page: PropTypes.shape({
110
- path: PropTypes.string
111
- })
108
+ path: PropTypes.string,
109
+ }),
112
110
  }),
113
111
  section: PropTypes.shape({
114
112
  modules: PropTypes.arrayOf(
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from "react";
4
4
  import PropTypes from "prop-types";
5
5
  import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight";
6
6
 
7
- import { getUrl } from "gatsby-core-theme/src/helpers/getters";
7
+ import { getUrl } from "~helpers/getters";
8
8
  import Form from "../../../organisms/form";
9
9
  import { newsLetterForm } from "../../../../constants/forms";
10
10
  import useTranslate from "~hooks/useTranslate/useTranslate";
@@ -32,7 +32,7 @@ const NewsletterForm = ({
32
32
  })
33
33
  .then((response) => response.json())
34
34
  .then((data) => {
35
- setIP(data.ip)
35
+ setIP(data.ip);
36
36
  })
37
37
  .catch((err) => {
38
38
  // eslint-disable-next-line no-console
@@ -1,26 +1,26 @@
1
- import React, { useState } from 'react';
2
- import { MdClose } from '@react-icons/all-files/md/MdClose';
3
- import PropTypes from 'prop-types';
4
- import { getUrl } from 'gatsby-core-theme/src/helpers/getters';
5
- import Button from './toggle-button/index';
6
- import useTranslate from '~hooks/useTranslate/useTranslate';
7
- import NewsletterForm from './form/index';
8
- import styles from './newsletter.module.scss';
1
+ import React, { useState } from "react";
2
+ import { MdClose } from "@react-icons/all-files/md/MdClose";
3
+ import PropTypes from "prop-types";
4
+ import { getUrl } from "~helpers/getters";
5
+ import Button from "./toggle-button/index";
6
+ import useTranslate from "~hooks/useTranslate/useTranslate";
7
+ import NewsletterForm from "./form/index";
8
+ import styles from "./newsletter.module.scss";
9
9
 
10
10
  const Newsletter = ({
11
11
  page,
12
- openBtnText = 'Unlock Bonuses',
12
+ openBtnText = "Unlock Bonuses",
13
13
  isSticky = false,
14
14
  showLabels = true,
15
- titleType = 'h2',
15
+ titleType = "h2",
16
16
  }) => {
17
17
  const [toggleNewsetter, setToggleNewsletter] = useState(false);
18
18
  const [isClicked, setIsClicked] = useState(false);
19
- const country = page?.market?.split('_')[0].toUpperCase();
20
- const newsletterOpenBtn = useTranslate('newsletter_open_btn', openBtnText)
19
+ const country = page?.market?.split("_")[0].toUpperCase();
20
+ const newsletterOpenBtn = useTranslate("newsletter_open_btn", openBtnText);
21
21
 
22
22
  const redirectUrl =
23
- page?.path === '/'
23
+ page?.path === "/"
24
24
  ? `${getUrl(page?.path)}?subscribed=true`
25
25
  : `${getUrl(page?.path)}/?subscribed=true`;
26
26
 
@@ -33,12 +33,14 @@ const Newsletter = ({
33
33
  <>
34
34
  {toggleNewsetter && (
35
35
  <div
36
- className={styles?.layer || '' }
36
+ className={styles?.layer || ""}
37
37
  onClick={() => setToggleNewsletter(false)}
38
38
  aria-hidden="true"
39
39
  />
40
40
  )}
41
- <div className={!isSticky ? styles.contentPage || '' : styles.content || ''}>
41
+ <div
42
+ className={!isSticky ? styles.contentPage || "" : styles.content || ""}
43
+ >
42
44
  {isSticky && (
43
45
  <Button
44
46
  active={!toggleNewsetter}
@@ -51,8 +53,10 @@ const Newsletter = ({
51
53
  <div
52
54
  className={
53
55
  !isSticky
54
- ? styles?.formPage || ''
55
- : `${styles?.form || ''} ${toggleNewsetter ? styles?.active || '' : ''}`
56
+ ? styles?.formPage || ""
57
+ : `${styles?.form || ""} ${
58
+ toggleNewsetter ? styles?.active || "" : ""
59
+ }`
56
60
  }
57
61
  >
58
62
  <NewsletterForm
@@ -62,11 +66,11 @@ const Newsletter = ({
62
66
  redirectUrl={redirectUrl}
63
67
  showLabels={showLabels}
64
68
  titleType={titleType}
65
- customClass={styles.newsletterForm || ''}
69
+ customClass={styles.newsletterForm || ""}
66
70
  />
67
71
  {isSticky && (
68
72
  <MdClose
69
- className={styles?.closeBtn || ''}
73
+ className={styles?.closeBtn || ""}
70
74
  onClick={() => setToggleNewsletter(false)}
71
75
  title="Close Icon"
72
76
  />
@@ -4,8 +4,9 @@ import PropTypes from 'prop-types';
4
4
  import styles from './tnc.module.scss';
5
5
  import { getOperatorTnc } from '~helpers/getters';
6
6
 
7
- const Tnc = ({ operator, isFixed = false }) => {
8
- const termsConditions = getOperatorTnc(operator);
7
+ const Tnc = ({ operator, isFixed = false, tracker }) => {
8
+
9
+ const termsConditions = getOperatorTnc(operator, tracker);
9
10
  return (
10
11
  termsConditions &&
11
12
  ((!isFixed && (
@@ -35,6 +36,7 @@ Tnc.propTypes = {
35
36
  main: PropTypes.string,
36
37
  }),
37
38
  }),
39
+ tracker: PropTypes.string,
38
40
  };
39
41
 
40
42
  export default Tnc;
@@ -3,49 +3,64 @@
3
3
  /* eslint-disable no-unused-expressions */
4
4
  /* eslint-disable prefer-destructuring */
5
5
  /* eslint-disable react-hooks/exhaustive-deps */
6
- import React, { useRef } from 'react';
6
+ import React, { useRef } from "react";
7
7
 
8
- import PropTypes from 'prop-types';
8
+ import PropTypes from "prop-types";
9
9
 
10
- import ScollX from 'gatsby-core-theme/src/hooks/scroll-x';
11
- import keygen from '~helpers/keygen';
12
- import useTranslate from '~hooks/useTranslate/useTranslate';
10
+ import ScollX from "~hooks/scroll-x";
11
+ import keygen from "~helpers/keygen";
12
+ import useTranslate from "~hooks/useTranslate/useTranslate";
13
13
  import { generatePlaceholderString } from "~helpers/generators";
14
14
 
15
- import styles from './template-two.module.scss';
15
+ import styles from "./template-two.module.scss";
16
16
 
17
- function Anchor({ module: { items }, icon = null, showTitle = true, exclOperator = false, page }) {
17
+ function Anchor({
18
+ module: { items },
19
+ icon = null,
20
+ showTitle = true,
21
+ exclOperator = false,
22
+ page,
23
+ }) {
18
24
  const itemsRef = useRef([]);
19
25
  const anchorContainerRef = useRef(null);
20
26
  const anchorListRef = useRef(null);
21
27
 
22
28
  return (
23
- <div className={styles.containerAnchor || ''} ref={anchorContainerRef}>
29
+ <div className={styles.containerAnchor || ""} ref={anchorContainerRef}>
24
30
  {showTitle ? (
25
- <div className={`${styles.anchorTitle || ''}`}>
31
+ <div className={`${styles.anchorTitle || ""}`}>
26
32
  <span>
27
- {useTranslate('anchor_title_responsible_gambling', 'You Might Wanna Jump To:)')}
33
+ {useTranslate(
34
+ "anchor_title_responsible_gambling",
35
+ "You Might Wanna Jump To:)"
36
+ )}
28
37
  </span>
29
38
  </div>
30
39
  ) : null}
31
40
  <div
32
- className={`${styles.defaultConatiner || ''} ${
33
- exclOperator ? styles.usingExclOperator || '' : ''
41
+ className={`${styles.defaultConatiner || ""} ${
42
+ exclOperator ? styles.usingExclOperator || "" : ""
34
43
  } `}
35
44
  >
36
45
  <ScollX refTag={anchorListRef}>
37
- <ul ref={anchorListRef} className={`${styles.anchor || ''}`}>
46
+ <ul ref={anchorListRef} className={`${styles.anchor || ""}`}>
38
47
  {items?.map((item, index) => (
39
- <li className={styles.anchorItem || ''}>
48
+ <li className={styles.anchorItem || ""}>
40
49
  <a
41
- className={`${styles.link || ''} anchor-carousel-gtm anchor-menu-gtm`}
50
+ className={`${
51
+ styles.link || ""
52
+ } anchor-carousel-gtm anchor-menu-gtm`}
42
53
  key={keygen()}
43
54
  draggable="false"
44
55
  // eslint-disable-next-line no-return-assign
45
56
  ref={(el) => (itemsRef.current[index] = el)}
46
57
  href={`#${item?.id && item.id}`}
47
58
  >
48
- {generatePlaceholderString(useTranslate(item.slug, item.label), null, page?.relation)}
59
+ {generatePlaceholderString(
60
+ useTranslate(item.slug, item.label),
61
+ null,
62
+ page?.relation
63
+ )}
49
64
  {icon}
50
65
  </a>
51
66
  </li>
@@ -68,9 +83,9 @@ Anchor.propTypes = {
68
83
  }).isRequired,
69
84
  styles: PropTypes.shape({}),
70
85
  icon: PropTypes.element,
71
- showTitle: PropTypes.bool,
86
+ showTitle: PropTypes.bool,
72
87
  page: PropTypes.shape({
73
- relation: PropTypes.shape({})
88
+ relation: PropTypes.shape({}),
74
89
  }),
75
90
  };
76
91
 
@@ -1,20 +1,20 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
- import React from 'react';
2
+ import React from "react";
3
3
  // eslint-disable-next-line import/no-extraneous-dependencies
4
- import PropTypes from 'prop-types';
4
+ import PropTypes from "prop-types";
5
5
 
6
- import LinkList from 'gatsby-core-theme/src/components/molecules/link-list';
7
- import { getFirstModuleByName } from 'gatsby-core-theme/src/helpers/getters';
8
- import styles from './footer-navigation.module.scss';
6
+ import LinkList from "~molecules/link-list";
7
+ import { getFirstModuleByName } from "~helpers/getters";
8
+ import styles from "./footer-navigation.module.scss";
9
9
 
10
10
  const FooterNavigation = ({ section, isStorybook = false }) => {
11
- const menuArray = getFirstModuleByName(section, 'menu');
11
+ const menuArray = getFirstModuleByName(section, "menu");
12
12
  return (
13
13
  menuArray?.children?.length > 0 && (
14
14
  <div
15
- className={`${styles?.footerLinks || ''}
16
- ${isStorybook ? styles?.isStoryBook : ''}
17
- ${styles?.showFooterNav || ''}
15
+ className={`${styles?.footerLinks || ""}
16
+ ${isStorybook ? styles?.isStoryBook : ""}
17
+ ${styles?.showFooterNav || ""}
18
18
  ${styles[section.style]}
19
19
  `}
20
20
  >
@@ -38,6 +38,7 @@ FooterNavigation.propTypes = {
38
38
  name: PropTypes.string,
39
39
  })
40
40
  ),
41
+ style: PropTypes.string,
41
42
  }).isRequired,
42
43
  isStorybook: PropTypes.bool,
43
44
  };
@@ -40,7 +40,6 @@ const Navigation = ({
40
40
  disableSearch,
41
41
  megaMenu = false,
42
42
  menu,
43
- menuPosition = "left",
44
43
  }) => {
45
44
  const navRef = useRef(React.createRef());
46
45
  const ariaLabelNavLogo = useTranslate("ariaLabel-navLogo", "Nav Logo");
@@ -79,21 +78,6 @@ const Navigation = ({
79
78
  }
80
79
  };
81
80
 
82
- const menuComponent = (
83
- <Menu
84
- pageContext={pageContext}
85
- section={section}
86
- orientation={orientation}
87
- mobileAnimation={mobileAnimation}
88
- stopScrollOnOpen={stopScrollOnOpen}
89
- canOpenAllSubMenus={canOpenAllSubMenus}
90
- customStyles={customStyles}
91
- gtmClass="main-menu-gtm"
92
- menu={menu}
93
- enableMegaMenu={megaMenu}
94
- />
95
- );
96
-
97
81
  return (
98
82
  <ConditionalWrapper
99
83
  condition={sticky}
@@ -134,7 +118,18 @@ const Navigation = ({
134
118
  )}
135
119
  {showMenu && (
136
120
  <>
137
- {menuPosition === "left" && menuComponent}
121
+ <Menu
122
+ pageContext={pageContext}
123
+ section={section}
124
+ orientation={orientation}
125
+ mobileAnimation={mobileAnimation}
126
+ stopScrollOnOpen={stopScrollOnOpen}
127
+ canOpenAllSubMenus={canOpenAllSubMenus}
128
+ customStyles={customStyles}
129
+ gtmClass="main-menu-gtm"
130
+ menu={menu}
131
+ enableMegaMenu={megaMenu}
132
+ />
138
133
  <div className={styles.navIconContainer}>
139
134
  {activeMarket && !disableMarketDropdown && (
140
135
  <MarketDropdown pageContext={pageContext} />
@@ -156,7 +151,6 @@ const Navigation = ({
156
151
  isDisabled={disableSearch}
157
152
  />
158
153
  )}
159
- {menuPosition === "right" && menuComponent}
160
154
  </div>
161
155
  </>
162
156
  )}
@@ -212,7 +206,6 @@ Navigation.propTypes = {
212
206
  logoAlt: PropTypes.string,
213
207
  logoWidth: PropTypes.number,
214
208
  logoHeight: PropTypes.number,
215
- menuPosition: PropTypes.oneOf(["left", "right"]),
216
209
  };
217
210
 
218
211
  export default Navigation;
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable react/react-in-jsx-scope */
2
2
  /* eslint-disable import/prefer-default-export */
3
3
  import React from "react";
4
- import StarRating from "gatsby-core-theme/src/components/molecules/star-rating/one-star";
5
4
  import { FaStar } from "@react-icons/all-files/fa/FaStar";
6
- import CloseCircleIcon from '~images/icons/close-circle';
7
- import CheckCircleIcon from '~images/icons/check-circle';
5
+ import StarRating from "~molecules/star-rating/one-star";
6
+ import CloseCircleIcon from "~images/icons/close-circle";
7
+ import CheckCircleIcon from "~images/icons/check-circle";
8
8
 
9
9
  export const operatorRatings = {
10
10
  operator: [
@@ -223,13 +223,11 @@ export const operatorRatings = {
223
223
  translationKey: "min_deposit",
224
224
  fieldValue: "min_deposit",
225
225
  componentToUse: (numOfStars, value, currency) => {
226
- if ((/N\/A|NA/i).test(value)) {
227
- return '-';
226
+ if (/N\/A|NA/i.test(value)) {
227
+ return "-";
228
228
  }
229
-
230
- return (
231
- <>{value ? `${currency}${value}` : "-"}</>
232
- )
229
+
230
+ return <>{value ? `${currency}${value}` : "-"}</>;
233
231
  },
234
232
  },
235
233
  {