gatsby-matrix-theme 34.0.9 → 34.0.10
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 +9 -0
- package/package.json +1 -1
- package/src/components/molecules/operator-summary/index.js +1 -1
- package/src/components/molecules/operator-summary/template-one/index.js +12 -9
- package/src/components/molecules/operator-summary/template-two/index.js +10 -3
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.171c1a93.iframe.bundle.js +2 -0
- package/tests/factories/pages/operator.factory.js +2 -2
- package/storybook/public/main.51b3c162.iframe.bundle.js +0 -2
- /package/storybook/public/{main.51b3c162.iframe.bundle.js.LICENSE.txt → main.171c1a93.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [34.0.10](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.9...v34.0.10) (2023-10-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add author image for main image ([b98930a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b98930a555700abf0cb1dfd48968044d071b3ed7))
|
|
7
|
+
* add correct img for storybook ([c803fad](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c803fad6f66866641f0a1b2ffcbaea95bff9b1c9))
|
|
8
|
+
* add img for operator and author ([142acec](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/142acec08cc26e0f6c5b05b536c54a355bb658c7))
|
|
9
|
+
|
|
1
10
|
## [34.0.9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.8...v34.0.9) (2023-10-09)
|
|
2
11
|
|
|
3
12
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import TemplateOne from './template-one';
|
|
3
3
|
import TemplateTwo from './template-two';
|
|
4
4
|
|
|
5
|
-
export default function index({ template = '
|
|
5
|
+
export default function index({ template = 'template_one', ...props }) {
|
|
6
6
|
switch (template) {
|
|
7
7
|
case 'template_two':
|
|
8
8
|
return <TemplateTwo {...props} />;
|
|
@@ -10,25 +10,27 @@ import Author from '../../../atoms/author/template-one';
|
|
|
10
10
|
import OperatorBanner from '../../../atoms/header-operator-bannner';
|
|
11
11
|
import styles from './template-one.module.scss';
|
|
12
12
|
|
|
13
|
-
const TemplateOne = ({
|
|
13
|
+
const TemplateOne = ({
|
|
14
|
+
page,
|
|
15
|
+
imgWidth = 128,
|
|
16
|
+
imgHeight = 146,
|
|
17
|
+
tnc = false,
|
|
18
|
+
operatorImg = false,
|
|
19
|
+
}) => {
|
|
14
20
|
const { translations } = useContext(Context) || {};
|
|
15
21
|
const operatorData = page?.relation;
|
|
16
22
|
const { standardised_logo_url_object, logo_url_object, name } = operatorData;
|
|
17
23
|
const operatorSummary = getExtraField(page.extra_fields, 'operator_review_summary', null);
|
|
18
24
|
const author = page?.reviewer;
|
|
25
|
+
const img = operatorImg
|
|
26
|
+
? standardised_logo_url_object?.filename || logo_url_object?.filename
|
|
27
|
+
: author?.image;
|
|
19
28
|
return (
|
|
20
29
|
<div className={styles?.summaryLayout || ''}>
|
|
21
30
|
<div className={styles.details}>
|
|
22
31
|
<h2>{translate(translations, 'expert_casino_review', 'Expert Casino Review')}</h2>
|
|
23
32
|
<div className={styles.img}>
|
|
24
|
-
<LazyImage
|
|
25
|
-
src={imagePrettyUrl(
|
|
26
|
-
standardised_logo_url_object?.filename || logo_url_object?.filename
|
|
27
|
-
)}
|
|
28
|
-
width={imgWidth}
|
|
29
|
-
height={imgHeight}
|
|
30
|
-
alt={name}
|
|
31
|
-
/>
|
|
33
|
+
<LazyImage src={imagePrettyUrl(img)} width={imgWidth} height={imgHeight} alt={name} />
|
|
32
34
|
</div>
|
|
33
35
|
<div className={styles.author}>
|
|
34
36
|
<Author
|
|
@@ -64,6 +66,7 @@ TemplateOne.propTypes = {
|
|
|
64
66
|
imgWidth: PropTypes.number,
|
|
65
67
|
imgHeight: PropTypes.string,
|
|
66
68
|
tnc: PropTypes.bool,
|
|
69
|
+
operatorImg: PropTypes.bool,
|
|
67
70
|
page: PropTypes.shape({
|
|
68
71
|
reviewer: PropTypes.shape({}),
|
|
69
72
|
relation_type: PropTypes.string,
|
|
@@ -11,21 +11,27 @@ import Author from '../../../atoms/author/template-one';
|
|
|
11
11
|
import OperatorBanner from '../../../atoms/header-operator-bannner';
|
|
12
12
|
import styles from './template-two.module.scss';
|
|
13
13
|
|
|
14
|
-
const TemplateTwo = ({
|
|
14
|
+
const TemplateTwo = ({
|
|
15
|
+
page,
|
|
16
|
+
imgWidth = 128,
|
|
17
|
+
imgHeight = 146,
|
|
18
|
+
tnc = false,
|
|
19
|
+
operatorImg = false,
|
|
20
|
+
}) => {
|
|
15
21
|
const { translations } = useContext(Context) || {};
|
|
16
22
|
const operatorData = page?.relation;
|
|
17
23
|
const { name } = operatorData;
|
|
18
24
|
const imageObject = operatorData?.standardised_logo_url_object || operatorData?.logo_url_object;
|
|
19
25
|
const operatorSummary = getExtraField(page.extra_fields, 'operator_review_summary', null);
|
|
20
26
|
const author = page?.reviewer;
|
|
21
|
-
|
|
27
|
+
const img = operatorImg ? imageObject : author?.image;
|
|
22
28
|
return (
|
|
23
29
|
<div>
|
|
24
30
|
<div className={styles?.summaryLayout || ''}>
|
|
25
31
|
<div className={styles.details}>
|
|
26
32
|
<div className={styles.img}>
|
|
27
33
|
<LazyImage
|
|
28
|
-
src={imagePrettyUrl(
|
|
34
|
+
src={imagePrettyUrl(img, imgWidth, imgHeight)}
|
|
29
35
|
width={imgWidth}
|
|
30
36
|
height={imgHeight}
|
|
31
37
|
alt={name}
|
|
@@ -69,6 +75,7 @@ TemplateTwo.propTypes = {
|
|
|
69
75
|
imgWidth: PropTypes.number,
|
|
70
76
|
imgHeight: PropTypes.string,
|
|
71
77
|
tnc: PropTypes.bool,
|
|
78
|
+
operatorImg: PropTypes.bool,
|
|
72
79
|
page: PropTypes.shape({
|
|
73
80
|
reviewer: PropTypes.shape({}),
|
|
74
81
|
relation_type: PropTypes.string,
|
|
@@ -361,4 +361,4 @@
|
|
|
361
361
|
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/navigation","files":"navigation.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/navigation\\/navigation\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/anchor","files":"anchor.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/anchor\\/anchor\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-one","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-one\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-two","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-two\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"content.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/content\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/text/Images","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\/Images\\/text\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/lists","files":"lists.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/lists\\/lists\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/pagination","files":"pagination.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/pagination\\/pagination\\.stories\\.js)$"}];</script><script src="runtime~main.3524c145.iframe.bundle.js"></script><script src="660.edfa73c6.iframe.bundle.js"></script><script src="main.
|
|
364
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/navigation","files":"navigation.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/navigation\\/navigation\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/anchor","files":"anchor.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/anchor\\/anchor\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-one","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-one\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-two","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-two\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"content.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/content\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/text/Images","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\/Images\\/text\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/lists","files":"lists.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/lists\\/lists\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/pagination","files":"pagination.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/pagination\\/pagination\\.stories\\.js)$"}];</script><script src="runtime~main.3524c145.iframe.bundle.js"></script><script src="660.edfa73c6.iframe.bundle.js"></script><script src="main.171c1a93.iframe.bundle.js"></script></body></html>
|