gatsby-matrix-theme 7.1.62 → 7.1.63

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,22 @@
1
+ ## [7.1.63](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.62...v7.1.63) (2022-09-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add new props for show rating and update theme ([ae05db1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ae05db14d8a2bb5d613c2ea72623b3d4d58312e6))
7
+ * show see more ([970f745](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/970f74500de0b8850032ad47b5b5418a12899a36))
8
+ * validate data ([5d4d31c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5d4d31c3f6e2af6f87782b56da340efaa2863de5))
9
+
10
+
11
+ ### Code Refactoring
12
+
13
+ * correction to page title for feedback component ([0e56912](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0e569129803a8deed0e5351e1828dd860e515bb6))
14
+ * correction to typo and fix feedback title operator name ([7d4c06f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7d4c06fe26cc3c8e66a04592965a41a861e2154b))
15
+
16
+
17
+ * Merge branch 'tm-3004-cards' into 'master' ([87b0192](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/87b019285cdf05310dc9850983963e225f3d3cf2))
18
+ * Merge branch 'tm-3060-feedback-title' into 'master' ([8e9d8df](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8e9d8dfe8006006eb63db78489116e4f9af56c72))
19
+
1
20
  ## [7.1.62](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.61...v7.1.62) (2022-09-23)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "7.1.62",
3
+ "version": "7.1.63",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "gatsby": "^4.20.0",
27
- "gatsby-core-theme": "11.0.9",
27
+ "gatsby-core-theme": "12.0.1",
28
28
  "gatsby-plugin-sharp": "^4.10.2",
29
29
  "gatsby-plugin-sitemap": "^3.3.0",
30
30
  "gatsby-transformer-sharp": "^4.10.0",
@@ -1,5 +1,7 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  import React, { useContext } from 'react';
2
3
  import PropTypes from 'prop-types';
4
+ import loadable from '@loadable/component';
3
5
  import Link from 'gatsby-core-theme/src/hooks/link';
4
6
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
5
7
  import {
@@ -14,11 +16,20 @@ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
14
16
  import BaseCard from '../base-card/index';
15
17
  import styles from './payment-method-card.module.scss';
16
18
 
17
- const PaymentMethodCard = ({ item, showTitle = true, showDesc = true, width, height }) => {
19
+ const PaymentMethodCard = ({
20
+ item,
21
+ showTitle = true,
22
+ showDesc = true,
23
+ width,
24
+ height,
25
+ showRating = false,
26
+ }) => {
18
27
  const { title, path, relation, sections } = item;
19
28
  const logUrlObject = relation?.logo_object;
20
29
  const { translations } = useContext(Context) || {};
21
-
30
+ const StarRating =
31
+ showRating &&
32
+ loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating/one-star'));
22
33
  return (
23
34
  <BaseCard item={item} cardType="payment_method">
24
35
  <div className={styles.content}>
@@ -39,6 +50,9 @@ const PaymentMethodCard = ({ item, showTitle = true, showDesc = true, width, hei
39
50
  {showTitle && (
40
51
  <Link className={`${styles.links} payment-method-card-gtm`} to={path}>
41
52
  <span className={styles.title}>{title}</span>
53
+ {showRating && (
54
+ <StarRating numOfStars={5} halfStars={false} rating={relation.rating} />
55
+ )}
42
56
  </Link>
43
57
  )}
44
58
  </div>
@@ -73,6 +87,7 @@ PaymentMethodCard.propTypes = {
73
87
  logo_object: PropTypes.shape({
74
88
  alt: PropTypes.string,
75
89
  }),
90
+ rating: PropTypes.string,
76
91
  }),
77
92
  sections: PropTypes.shape({
78
93
  header: PropTypes.shape({
@@ -84,6 +99,7 @@ PaymentMethodCard.propTypes = {
84
99
  }).isRequired,
85
100
  width: PropTypes.number,
86
101
  height: PropTypes.number,
102
+ showRating: PropTypes.bool,
87
103
  };
88
104
 
89
105
  export default PaymentMethodCard;
@@ -8,7 +8,7 @@ import { BiDislike } from '@react-icons/all-files/bi/BiDislike';
8
8
 
9
9
  import styles from './feedback.module.scss';
10
10
 
11
- const FeetBack = ({ pageId, casinoTitle, trueVotes, falseVotes, contactUs = '/contact-us' }) => {
11
+ const FeedBack = ({ pageId, casinoTitle, trueVotes, falseVotes, contactUs = '/contact-us' }) => {
12
12
  const { translations } = useContext(Context) || {};
13
13
  const [voted, setVote] = useState(null);
14
14
  const [error, setError] = useState(null);
@@ -118,7 +118,7 @@ const FeetBack = ({ pageId, casinoTitle, trueVotes, falseVotes, contactUs = '/co
118
118
  );
119
119
  };
120
120
 
121
- FeetBack.propTypes = {
121
+ FeedBack.propTypes = {
122
122
  pageId: PropTypes.number,
123
123
  casinoTitle: PropTypes.string,
124
124
  trueVotes: PropTypes.number,
@@ -126,4 +126,4 @@ FeetBack.propTypes = {
126
126
  contactUs: PropTypes.string,
127
127
  };
128
128
 
129
- export default FeetBack;
129
+ export default FeedBack;
@@ -80,9 +80,11 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
80
80
 
81
81
  const template = pageContext && pageContext?.page?.template;
82
82
  const type = pageContext && pageContext?.page?.type;
83
+ const seeMore = module?.see_more_link;
84
+
83
85
  return module.module_title ||
84
86
  (module.title && (module.name === 'cards' || module.name === 'top_list')) ? (
85
- module.link_label ? (
87
+ seeMore ? (
86
88
  <div
87
89
  className={`${styles.moduleTitle} ${styles[type]} ${styles[template]} ${
88
90
  module?.style && styles[module.style]
@@ -90,9 +92,9 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
90
92
  >
91
93
  {(module?.title || module.module_title) && getTitle(styles.toplistTitle)}
92
94
 
93
- {module.link_label && (
94
- <Link to={module.link_value} className={`${styles.viewMore} module-title-gtm`}>
95
- {module.link_label}
95
+ {seeMore && (
96
+ <Link to={seeMore.value_label} className={`${styles.viewMore} module-title-gtm`}>
97
+ {seeMore.title}
96
98
  {viewMoreIcon}
97
99
  </Link>
98
100
  )}
@@ -123,6 +125,10 @@ ModuleTitle.propTypes = {
123
125
  }),
124
126
  show_last_updated_date: PropTypes.string,
125
127
  title: PropTypes.string,
128
+ see_more_link: PropTypes.shape({
129
+ title: PropTypes.string,
130
+ value_label: PropTypes.string,
131
+ }),
126
132
  }),
127
133
  viewMoreIcon: PropTypes.element,
128
134
  pageContext: PropTypes.shape({}),
@@ -49,7 +49,7 @@ const Main = ({ section = {}, pageContext = {}, showNewsletter = true }) => {
49
49
  trueVotes={page?.true_votes}
50
50
  falseVotes={page?.false_votes}
51
51
  pageId={page?.id}
52
- casinoTitle={page?.title}
52
+ casinoTitle={page?.relation ? page?.relation.name : page?.title}
53
53
  />
54
54
  )}
55
55
  </main>