gatsby-matrix-theme 53.2.44 → 53.2.45

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 (37) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +1 -1
  3. package/src/components/atoms/cards/operator-card/template-four/index.js +4 -3
  4. package/src/components/atoms/cards/operator-card/template-four/template-four.stories.js +3 -3
  5. package/src/components/atoms/cards/operator-card/template-one/index.js +4 -3
  6. package/src/components/atoms/cards/operator-card/template-one/template-one.stories.js +4 -3
  7. package/src/components/atoms/cards/operator-card/template-three/index.js +4 -3
  8. package/src/components/atoms/cards/operator-card/template-two/index.js +4 -3
  9. package/src/components/atoms/disclaimer/affiliate-disclaimer/index.js +4 -3
  10. package/src/components/atoms/review-credits/index.js +8 -7
  11. package/src/components/molecules/header/variants/author/assets/name/index.js +4 -3
  12. package/src/components/molecules/header/variants/operator/template-five/index.js +4 -3
  13. package/src/components/molecules/header/variants/operator/template-four/index.js +4 -3
  14. package/src/components/molecules/header/variants/operator/template-three/index.js +4 -3
  15. package/src/components/molecules/header/variants/payment/template-five/index.js +4 -3
  16. package/src/components/molecules/header/variants/payment/template-four/index.js +4 -3
  17. package/src/components/molecules/header/variants/payment/template-one-three/index.js +5 -4
  18. package/src/components/molecules/header/variants/payment/template-two/index.js +5 -4
  19. package/src/components/molecules/header/variants/slot/template-one/index.js +5 -5
  20. package/src/components/molecules/header/variants/slot/template-two/index.js +6 -6
  21. package/src/components/organisms/cards/index.js +47 -13
  22. package/src/gatsby-core-theme/components/molecules/header/index.js +11 -8
  23. package/storybook/public/127.5e3a1d21.iframe.bundle.js +1 -0
  24. package/storybook/public/{384.bccdaa8c.iframe.bundle.js → 384.4217d9dc.iframe.bundle.js} +3 -3
  25. package/storybook/public/{384.bccdaa8c.iframe.bundle.js.map → 384.4217d9dc.iframe.bundle.js.map} +1 -1
  26. package/storybook/public/409.2220e9bb.iframe.bundle.js +1 -0
  27. package/storybook/public/537.0a21c102.iframe.bundle.js +1 -0
  28. package/storybook/public/591.d001ec8b.iframe.bundle.js +1 -0
  29. package/storybook/public/693.bafcff12.iframe.bundle.js +1 -0
  30. package/storybook/public/786.149e758a.iframe.bundle.js +1 -0
  31. package/storybook/public/iframe.html +1 -1
  32. package/storybook/public/main.7326bf32.iframe.bundle.js +1 -0
  33. package/storybook/public/project.json +1 -1
  34. package/storybook/public/runtime~main.21787271.iframe.bundle.js +1 -0
  35. package/storybook/public/main.715eed9a.iframe.bundle.js +0 -1
  36. package/storybook/public/runtime~main.6655059b.iframe.bundle.js +0 -1
  37. /package/storybook/public/{384.bccdaa8c.iframe.bundle.js.LICENSE.txt → 384.4217d9dc.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [53.2.45](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.44...v53.2.45) (2025-09-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add lazy load for icon ([c9e5c9a](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/c9e5c9a9e08578ae1e0e834f720ca23171d300a3))
7
+ * fix icon ([dd6bddc](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/dd6bddc0c37f5e6d4ae9e4e71801371a1e7ad363))
8
+ * update lazy ([0610a04](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/0610a040dd040042257ba77eb6d74986ea61ea92))
9
+ * update theme ([7a676b8](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/7a676b8888dd43e30412daf88b28a72a4001f444))
10
+
11
+
12
+ * Merge branch 'en-8-perfomence' into 'master' ([8926354](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/8926354efca5f2feb9e2bec783cef26ba6b4508a))
13
+
1
14
  ## [53.2.44](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.43...v53.2.44) (2025-09-02)
2
15
 
3
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "53.2.44",
3
+ "version": "53.2.45",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -1,16 +1,17 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { Suspense, lazy } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { BiLike } from '@react-icons/all-files/bi/BiLike';
5
5
  import { BiDislike } from '@react-icons/all-files/bi/BiDislike';
6
6
  import BonusTemplateDefault from 'gatsby-core-theme/src/components/molecules/bonus-box/template-three';
7
7
  import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
8
8
  import Rating from 'gatsby-core-theme/src/components/atoms/ratings';
9
- import Verify from '~images/icons/verify';
10
9
  import OperatorDetails from '../../../../molecules/operator-details';
11
10
  import { TrackingKeys } from '~constants/tracking-api'
12
11
  import styles from './template-four.module.scss';
13
12
 
13
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
14
+
14
15
  const TemplateFour = ({
15
16
  item,
16
17
  useOneStarRating = true,
@@ -20,7 +21,7 @@ const TemplateFour = ({
20
21
  showRatingLabel = false,
21
22
  showRatingDecimal = false,
22
23
  authorTemplateTwo = true,
23
- verifyIcon = <Verify />,
24
+ verifyIcon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
24
25
  showBonusForAll = false,
25
26
  width = 88,
26
27
  height = 88,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { lazy, Suspense } from 'react';
3
3
  import {
4
4
  Title,
5
5
  Description,
@@ -8,11 +8,11 @@ import {
8
8
  ArgsTable,
9
9
  } from '@storybook/addon-docs/blocks';
10
10
  import { getSampleOperatorCards } from 'gatsby-core-theme/tests/factories/modules/card.factory';
11
- import Verify from '~images/icons/verify';
12
11
  import TemplateFour from '.';
13
12
  import styles from './template-four.module.scss';
14
13
 
15
14
  const operatorData = getSampleOperatorCards();
15
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
16
16
 
17
17
  export default {
18
18
  title: 'Theme/Modules/Cards/Operator/Template Four',
@@ -27,7 +27,7 @@ export default {
27
27
  verifyIcon: {
28
28
  name: 'verifyIcon',
29
29
  type: { name: 'element', required: false },
30
- defaultValue: <Verify />,
30
+ defaultValue: <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
31
31
  description: 'verify icon',
32
32
  },
33
33
  page: {
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { FaCheck } from '@react-icons/all-files/fa/FaCheck';
5
5
  import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
@@ -10,13 +10,14 @@ import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
10
10
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
11
11
  import OperatorCta from 'gatsby-core-theme/src/components/atoms/button/operator-cta';
12
12
  import SellingPoints from 'gatsby-core-theme/src/components/atoms/selling-points';
13
- import Verify from '~images/icons/verify';
14
13
  import OperatorDetails from '../../../../molecules/operator-details';
15
14
  import styles from './template-one.module.scss';
16
15
  import Bonus from '~molecules/bonus-box/template-one';
17
16
  import { TrackingKeys } from '~constants/tracking-api';
18
17
  import VariableComponent from '../variables';
19
18
 
19
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
20
+
20
21
  const TemplateOne = ({
21
22
  showRibbon = false,
22
23
  item,
@@ -31,7 +32,7 @@ const TemplateOne = ({
31
32
  authorTemplateTwo = true,
32
33
  sellingPointsIcon = <FaCheck title="Check Icon" />,
33
34
  showBonusForAll = false,
34
- verifyIcon = <Verify />,
35
+ verifyIcon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
35
36
  showOperatorCta = true,
36
37
  operatorLogoWidth = 88,
37
38
  operatorLogoHeight = 88,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { lazy, Suspense } from 'react';
3
3
  import {
4
4
  Title,
5
5
  Description,
@@ -8,9 +8,10 @@ import {
8
8
  ArgsTable,
9
9
  } from '@storybook/addon-docs/blocks';
10
10
  import { getSampleOperatorCards } from 'gatsby-core-theme/tests/factories/modules/card.factory';
11
- import Verify from '~images/icons/verify';
12
11
  import TemplateOne from '.';
13
12
 
13
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
14
+
14
15
  const operatorData = getSampleOperatorCards();
15
16
 
16
17
  export default {
@@ -33,7 +34,7 @@ export default {
33
34
  verifyIcon: {
34
35
  name: 'verifyIcon',
35
36
  type: { name: 'element', required: false },
36
- defaultValue: <Verify />,
37
+ defaultValue: <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
37
38
  description: 'verify icon',
38
39
  },
39
40
  page: {
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { BiLike } from '@react-icons/all-files/bi/BiLike';
5
5
  import { BiDislike } from '@react-icons/all-files/bi/BiDislike';
@@ -7,19 +7,20 @@ import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
7
7
  import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
8
8
  import BonusTemplateDefault from 'gatsby-core-theme/src/components/molecules/bonus-box/template-three';
9
9
  import OperatorCta from 'gatsby-core-theme/src/components/atoms/button/operator-cta';
10
- import Verify from '~images/icons/verify';
11
10
  import OperatorDetails from '../../../../molecules/operator-details';
12
11
  import VariableComponent from '../variables';
13
12
  import { TrackingKeys } from '~constants/tracking-api'
14
13
  import styles from './template-three.module.scss';
15
14
 
15
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
16
+
16
17
  const TemplateThree = ({
17
18
  showRibbon = false,
18
19
  item,
19
20
  useOneStarRating = true,
20
21
  page,
21
22
  showAuthor = true,
22
- verifyIcon = <Verify />,
23
+ verifyIcon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
23
24
  showRatingLabel = false,
24
25
  showRatingDecimal = false,
25
26
  authorTemplateTwo = true,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
5
5
  import Link from 'gatsby-core-theme/src/hooks/link';
@@ -7,12 +7,13 @@ import BonusTemplateDefault from 'gatsby-core-theme/src/components/molecules/bon
7
7
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
8
8
  import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
9
9
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
10
- import Verify from '~images/icons/verify';
11
10
  import VariableComponent from '../variables';
12
11
  import OperatorDetails from '../../../../molecules/operator-details';
13
12
  import { TrackingKeys } from '~constants/tracking-api'
14
13
  import styles from './template-two.module.scss';
15
14
 
15
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
16
+
16
17
  const TemplateTwo = ({
17
18
  showRibbon = false,
18
19
  item,
@@ -25,7 +26,7 @@ const TemplateTwo = ({
25
26
  authorTemplateTwo = true,
26
27
  contentRibbon = false,
27
28
  hasVariableComponent = false,
28
- verifyIcon = <Verify />,
29
+ verifyIcon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
29
30
  showBonusForAll = false,
30
31
  operatorLogoWidth = 88,
31
32
  operatorLogoHeight = 88,
@@ -1,16 +1,17 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
2
  /* eslint-disable camelcase */
3
- import React from 'react';
3
+ import React, { lazy, Suspense } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import useTranslate from '~hooks/useTranslate/useTranslate';
6
6
 
7
7
  import Tooltip from '../../tooltip';
8
- import AffiliateDisclaimerIcon from '../../../../images/icons/affiliate-disclaimer';
9
8
  import styles from './affiliate-disclaimer.module.scss';
10
9
 
10
+ const AffiliateDisclaimerIcon = lazy(() => import('../../../../images/icons/affiliate-disclaimer'));
11
+
11
12
  const AffiliateDisclaimer = ({
12
13
  showIcon = true,
13
- icon = <AffiliateDisclaimerIcon />,
14
+ icon = <Suspense fallback={<></>}><AffiliateDisclaimerIcon /></Suspense>,
14
15
  className = '',
15
16
  direction = 'bottom',
16
17
  content,
@@ -1,21 +1,22 @@
1
1
  /* eslint-disable arrow-body-style */
2
- import React from 'react';
2
+ import React, { lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { IoOpenOutline } from '@react-icons/all-files/io5/IoOpenOutline';
5
5
  import { formatDate } from '~helpers/date-time';
6
6
  import useTranslate from '~hooks/useTranslate/useTranslate';
7
7
  import Collapse from '~atoms/collapse';
8
8
  import Author from '../author/template-three';
9
- import ContributorsIcon from '../../../images/icons/contributors';
10
- import FactCheckIcon from '~images/icons/fact-check';
11
- import Clock from '~images/icons/clock';
12
9
  import styles from './review-credits.module.scss';
13
10
 
11
+ const ContributorsIcon = lazy(() => import('../../../images/icons/contributors'));
12
+ const FactCheckIcon = lazy(() => import('~images/icons/fact-check'));
13
+ const Clock = lazy(() => import('~images/icons/clock'));
14
+
14
15
  const ReviewCredits = ({
15
16
  authors,
16
17
  authorImageWidth = 48,
17
18
  authorImageHeight = 48,
18
- clock = <Clock />,
19
+ clock = <Suspense fallback={<></>}><Clock /></Suspense>,
19
20
  date,
20
21
  dateFormat = 'DD.MM.YYYY',
21
22
  showLinks=true,
@@ -41,7 +42,7 @@ const ReviewCredits = ({
41
42
  showVerification = true,
42
43
  splitDateFormat = '.',
43
44
  type = 'default',
44
- verifyIcon = <FactCheckIcon width={15} height={15} />,
45
+ verifyIcon = <Suspense fallback={<></>}><FactCheckIcon width={15} height={15} /></Suspense>,
45
46
  incommingClass='',
46
47
  }) => {
47
48
  const getPrefixBasedOnPage = type.includes('review')
@@ -152,7 +153,7 @@ const ReviewCredits = ({
152
153
 
153
154
  const buttonText = (
154
155
  <>
155
- <ContributorsIcon />
156
+ <Suspense fallback={<></>}><ContributorsIcon /></Suspense>
156
157
  {useTranslate('contributors', 'About this page')}
157
158
  </>
158
159
  );
@@ -1,9 +1,10 @@
1
- import React from 'react';
1
+ import React, { lazy, Suspense } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import Verify from '~images/icons/verify';
4
3
  import styles from './name.module.scss';
5
4
 
6
- export default function Name({ className = '', name, icon = <Verify />, pronouns = '' }) {
5
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
6
+
7
+ export default function Name({ className = '', name, icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>, pronouns = '' }) {
7
8
  return (
8
9
  <div className={styles.title}>
9
10
  <h1 className={`${className || ''} ${styles?.name || ''}`}>
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { lazy, Suspense } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
4
4
  import { imagePrettyUrl, getObjectValue } from '~helpers/getters';
@@ -10,11 +10,12 @@ import OperatorBanner from '~atoms/header-operator-bannner';
10
10
  import { operatorRatings } from '~constants/ratings-constant';
11
11
  import useTranslate from '~hooks/useTranslate/useTranslate';
12
12
  import { TrackingKeys } from '~constants/tracking-api'
13
- import Verify from '~images/icons/verify';
14
13
  import PrettyLink from '~atoms/pretty-link';
15
14
 
16
15
  import styles from './template-five.module.scss';
17
16
 
17
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
18
+
18
19
  const TemplateFive = ({
19
20
  relation,
20
21
  image,
@@ -24,7 +25,7 @@ const TemplateFive = ({
24
25
  extraFields,
25
26
  type,
26
27
  numOfStars = 5,
27
- icon = <Verify color="#295DD6" />,
28
+ icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
28
29
  showRoundedRating = false,
29
30
  operatorLogoWidth = 208,
30
31
  operatorLogoHeight = 208,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { lazy, Suspense } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  // eslint-disable-next-line import/no-extraneous-dependencies
4
4
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
@@ -10,12 +10,13 @@ import OperatorBanner from '~atoms/header-operator-bannner';
10
10
  import Ribbon from '~atoms/ribbons';
11
11
  import Rating from '~atoms/ratings';
12
12
  import useTranslate from '~hooks/useTranslate/useTranslate';
13
- import Verify from '~images/icons/verify';
14
13
  import VariableComponent from '../variables';
15
14
  import { TrackingKeys } from '~constants/tracking-api'
16
15
  import styles from './template-four.module.scss';
17
16
  import PrettyLink from '~atoms/pretty-link';
18
17
 
18
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
19
+
19
20
  const TemplateFour = ({
20
21
  relation,
21
22
  type,
@@ -23,7 +24,7 @@ const TemplateFour = ({
23
24
  name,
24
25
  ribbons,
25
26
  pageTemplate,
26
- icon = <Verify color="#295DD6" />,
27
+ icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
27
28
  numOfStars = 5,
28
29
  hasVariableComponent = false,
29
30
  showRoundedRating = false,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { imagePrettyUrl } from '~helpers/getters';
5
5
  import { getAltText } from '~helpers/image';
@@ -7,12 +7,13 @@ import LazyImage from '~hooks/lazy-image';
7
7
  import Rating from '~atoms/ratings';
8
8
  import OperatorBanner from '~atoms/header-operator-bannner';
9
9
  import Ribbons from '~atoms/ribbons';
10
- import Verify from '~images/icons/verify';
11
10
  import VariableComponent from '../variables';
12
11
  import { TrackingKeys } from '~constants/tracking-api'
13
12
  import styles from './template-three.module.scss';
14
13
  import PrettyLink from '~atoms/pretty-link';
15
14
 
15
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
16
+
16
17
  const TemplateThree = ({
17
18
  relation,
18
19
  type,
@@ -21,7 +22,7 @@ const TemplateThree = ({
21
22
  ribbons,
22
23
  numOfStars,
23
24
  pageTemplate,
24
- icon = <Verify color="#295DD6" />,
25
+ icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
25
26
  hasVariableComponent = false,
26
27
  width = 179,
27
28
  height = 179,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/no-danger */
2
- import React, { useState, useRef } from 'react';
2
+ import React, { useState, useRef, lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { imagePrettyUrl, textWordsLimit } from '~helpers/getters';
5
5
  import { getAltText } from '~helpers/image';
@@ -9,10 +9,11 @@ import OperatorBanner from '~atoms/header-operator-bannner';
9
9
  import Rating from '~atoms/ratings';
10
10
  import useTranslate from '~hooks/useTranslate/useTranslate';
11
11
  import { TrackingKeys } from '~constants/tracking-api';
12
- import Verify from '~images/icons/verify';
13
12
 
14
13
  import styles from './template-five.module.scss';
15
14
 
15
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
16
+
16
17
  const TemplateOneThree = ({
17
18
  relation,
18
19
  type,
@@ -20,7 +21,7 @@ const TemplateOneThree = ({
20
21
  image,
21
22
  sections = {},
22
23
  pageTemplate,
23
- icon = <Verify color="#295DD6" />,
24
+ icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
24
25
  description,
25
26
  numOfStars,
26
27
  CostumeComponent = null,
@@ -1,14 +1,15 @@
1
- import React from 'react';
1
+ import React, { lazy, Suspense } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { imagePrettyUrl } from '~helpers/getters';
4
4
  import { getAltText } from '~helpers/image';
5
5
  import LazyImage from '~hooks/lazy-image';
6
6
  import Rating from '~atoms/ratings';
7
7
  import OperatorBanner from '~atoms/header-operator-bannner';
8
- import Verify from '~images/icons/verify';
9
8
  import { TrackingKeys } from '~constants/tracking-api'
10
9
  import styles from './template-four.module.scss';
11
10
 
11
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
12
+
12
13
  const TemplateFour = ({
13
14
  relation,
14
15
  type,
@@ -16,7 +17,7 @@ const TemplateFour = ({
16
17
  name,
17
18
  sections = {},
18
19
  pageTemplate,
19
- icon = <Verify color="#295DD6" />,
20
+ icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
20
21
  numOfStars = 5,
21
22
  showRoundedRating = false,
22
23
  width = 300,
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/no-danger */
2
- import React, { useState, useRef } from 'react';
2
+ import React, { useState, useRef, lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
5
5
  import { imagePrettyUrl, textWordsLimit } from '~helpers/getters';
@@ -10,10 +10,11 @@ import OperatorBanner from '~atoms/header-operator-bannner';
10
10
  import Rating from '~atoms/ratings';
11
11
  import useTranslate from '~hooks/useTranslate/useTranslate';
12
12
  import { TrackingKeys } from '~constants/tracking-api';
13
- import Verify from '~images/icons/verify';
14
-
15
13
  import styles from './template-one-three.module.scss';
16
14
 
15
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
16
+
17
+
17
18
  const TemplateOneThree = ({
18
19
  relation,
19
20
  type,
@@ -21,7 +22,7 @@ const TemplateOneThree = ({
21
22
  image,
22
23
  sections = {},
23
24
  pageTemplate,
24
- icon = <Verify color="#295DD6" />,
25
+ icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
25
26
  description,
26
27
  numOfStars,
27
28
  template = 'template_one',
@@ -1,7 +1,8 @@
1
1
  /* eslint-disable react/no-danger */
2
- import React, { useState, useRef } from 'react';
2
+ import React, { useState, useRef, lazy, Suspense } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
5
+ import styles from './template-two.module.scss';
5
6
  import { getAltText } from '~helpers/image';
6
7
  import { imagePrettyUrl, textWordsLimit } from '~helpers/getters';
7
8
  import LazyImage from '~hooks/lazy-image';
@@ -10,9 +11,9 @@ import OperatorBanner from '~atoms/header-operator-bannner';
10
11
  import useTranslate from '~hooks/useTranslate/useTranslate';
11
12
  import { TrackingKeys } from '~constants/tracking-api';
12
13
 
13
- import Verify from '~images/icons/verify';
14
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
15
+
14
16
 
15
- import styles from './template-two.module.scss';
16
17
 
17
18
  const TemplateTwo = ({
18
19
  relation,
@@ -20,7 +21,7 @@ const TemplateTwo = ({
20
21
  image,
21
22
  sections = {},
22
23
  pageTemplate,
23
- icon = <Verify color="#295DD6" />,
24
+ icon = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
24
25
  description,
25
26
  numOfStars,
26
27
  showRoundedRating = false,
@@ -1,19 +1,19 @@
1
- import React from 'react';
1
+ import React, { lazy, Suspense } from 'react';
2
2
  import PropTypes from 'prop-types';
3
-
4
3
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
4
+ import styles from './slot.module.scss';
5
5
  import { imagePrettyUrl } from '~helpers/getters';
6
6
  import { getAltText } from '~helpers/image';
7
7
  import OperatorBanner from '~atoms/header-operator-bannner';
8
8
  import Rating from '~atoms/ratings';
9
- import Verify from '~images/icons/verify';
10
9
  import { TrackingKeys } from '~constants/tracking-api'
11
10
 
12
- import styles from './slot.module.scss';
11
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
12
+
13
13
 
14
14
  export default function SlotHeader({
15
15
  page,
16
- image = <Verify />,
16
+ image = <Suspense fallback={<></>}><VerifyIcon /></Suspense>,
17
17
  showExtraRatings = false,
18
18
  width = 170,
19
19
  height = 170,
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import React, { lazy, Suspense } from 'react';
2
2
  import PropTypes from 'prop-types';
3
-
3
+ import styles from './template-two.module.scss';
4
4
  import { imagePrettyUrl } from '~helpers/getters';
5
5
  import { getAltText } from '~helpers/image';
6
6
  import Tnc from '~molecules/tnc';
@@ -8,13 +8,13 @@ import LazyImage from '~hooks/lazy-image';
8
8
  import OperatorBanner from '~atoms/header-operator-bannner';
9
9
  import Rating from '~atoms/ratings';
10
10
  import useTranslate from '~hooks/useTranslate/useTranslate';
11
- import Verify from '~images/icons/verify';
12
11
  import { TrackingKeys } from '~constants/tracking-api'
13
12
 
14
- import styles from './template-two.module.scss';
13
+ const VerifyIcon = lazy(() => import('~images/icons/verify'));
14
+
15
15
 
16
- const TemplateTwo = ({ page, image = <Verify />, width = 259, height = 259, moduleName = TrackingKeys?.HEADERSLOTS }) => {
17
- const imageObject = page.relation?.logo
16
+ const TemplateTwo = ({ page, image = <Suspense fallback={<></>}><VerifyIcon /></Suspense>, width = 259, height = 259, moduleName = TrackingKeys?.HEADERSLOTS }) => {
17
+ const imageObject = page.relation?.logo;
18
18
  // eslint-disable-next-line react/prop-types
19
19
  const headerBonus = page?.sections?.header?.modules?.find((bonus) => bonus?.name === 'bonus');
20
20
  return (
@@ -1,44 +1,78 @@
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 { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
4
- import ModuleIntroduction from './module-introduction';
5
4
  import SeeMore from '../../atoms/see-more';
6
- import OperatorsTable from '../../atoms/cards/operators-table';
7
- import ComparisonTable from '../../atoms/cards/comparison-table';
8
- import SrcollLayout from './template-two';
9
- import GridLayout from './template-one';
10
- import TemplateThree from './template-three';
5
+ import ModuleIntroduction from './module-introduction';
11
6
 
12
7
  export default function index({ module, page, seeMoreButtonDown = false, modulePosition }) {
13
8
  // eslint-disable-next-line no-unused-expressions
14
- module.style === 'template_three' ? seeMoreButtonDown = true : seeMoreButtonDown
9
+ module.style === 'template_three' ? (seeMoreButtonDown = true) : seeMoreButtonDown;
15
10
  const templateThree = module.style === 'template_three';
11
+ const ComparisonTableComponent = lazy(() => import('../../atoms/cards/comparison-table'));
12
+
13
+ const OperatorsTableComponent = lazy(() => import('../../atoms/cards/operators-table'));
14
+
15
+ const GridLayoutComponent = lazy(() => import('./template-one'));
16
+
17
+ const SrcollLayoutComponent = lazy(() => import('./template-two'));
18
+
19
+ const TemplateThreeComponent = lazy(() => import('./template-three'));
20
+
16
21
  const Component = () => {
17
22
  switch (module?.style) {
18
23
  case 'stack_table': {
19
24
  if (module.cards_page_type === 'operator') {
20
- return <OperatorsTable module={module} page={page} modulePosition={modulePosition} />;
25
+ return (
26
+ <Suspense fallback={<></>}>
27
+ <OperatorsTableComponent
28
+ module={module}
29
+ page={page}
30
+ modulePosition={modulePosition}
31
+ />
32
+ </Suspense>
33
+ );
21
34
  }
22
35
  return null;
23
36
  }
24
37
  case 'comparison_table': {
25
38
  if (module.cards_page_type === 'operator') {
26
- return <ComparisonTable module={module} page={page} modulePosition={modulePosition} />;
39
+ return (
40
+ <Suspense fallback={<></>}>
41
+ <ComparisonTableComponent
42
+ module={module}
43
+ page={page}
44
+ modulePosition={modulePosition}
45
+ />
46
+ </Suspense>
47
+ );
27
48
  }
28
49
  return null;
29
50
  }
30
51
  case 'template_two': {
31
52
  return (
32
- <SrcollLayout module={module} page={page} modulePosition={modulePosition} />
53
+ <Suspense fallback={<></>}>
54
+ <SrcollLayoutComponent module={module} page={page} modulePosition={modulePosition} />
55
+ </Suspense>
33
56
  );
34
57
  }
35
58
  case 'template_three': {
36
59
  return (
37
- <TemplateThree module={module} page={page} modulePosition={modulePosition} templateThree />
60
+ <Suspense fallback={<></>}>
61
+ <TemplateThreeComponent
62
+ module={module}
63
+ page={page}
64
+ modulePosition={modulePosition}
65
+ templateThree
66
+ />
67
+ </Suspense>
38
68
  );
39
69
  }
40
70
  default: {
41
- return <GridLayout module={module} page={page} modulePosition={modulePosition} />;
71
+ return (
72
+ <Suspense fallback={<></>}>
73
+ <GridLayoutComponent module={module} page={page} modulePosition={modulePosition} />
74
+ </Suspense>
75
+ );
42
76
  }
43
77
  }
44
78
  };