gatsby-matrix-theme 19.0.2 → 19.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 +16 -0
- package/package.json +1 -1
- package/src/components/atoms/cards/article-card/template-one/index.js +9 -3
- package/src/components/molecules/operator-exclusive/index.js +3 -13
- package/src/components/molecules/small-welcome-bonus/index.js +2 -3
- package/src/components/organisms/popup/index.js +1 -1
- package/src/gatsby-core-theme/components/organisms/carousel/index.js +1 -2
- package/storybook/public/{454.1f2ee5a6.iframe.bundle.js → 454.9a63456f.iframe.bundle.js} +3 -3
- package/storybook/public/{454.1f2ee5a6.iframe.bundle.js.map → 454.9a63456f.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.cb6b7768.iframe.bundle.js +1 -0
- package/storybook/public/main.f2438e56.iframe.bundle.js +0 -1
- /package/storybook/public/{454.1f2ee5a6.iframe.bundle.js.LICENSE.txt → 454.9a63456f.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [19.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v19.0.2...v19.0.3) (2023-04-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added author link as optional ([3e4ef4d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3e4ef4d2b4e3a814c47e88c250eb5829eb259fca))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* update mobile device detect import and implementation ([08218c5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/08218c5f4f489c665645f9771aa70e3b5ead4d5b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
* Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([be5c739](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/be5c739cbf2a15f3c3884d175712849efc89a550))
|
|
15
|
+
* Merge branch 'tm-3348-remove-is-mobile-func' into 'master' ([edbceb8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/edbceb8d75b78469cce114092bc91bf86aa1e201))
|
|
16
|
+
|
|
1
17
|
## [19.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v19.0.1...v19.0.2) (2023-04-12)
|
|
2
18
|
|
|
3
19
|
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import styles from './article-card.module.scss';
|
|
|
11
11
|
|
|
12
12
|
const ArticleCard = ({
|
|
13
13
|
showAuthorOnOneLine = false,
|
|
14
|
+
showAuthorAsLink = false,
|
|
14
15
|
item,
|
|
15
16
|
width = 360,
|
|
16
17
|
height = 240,
|
|
@@ -57,9 +58,13 @@ const ArticleCard = ({
|
|
|
57
58
|
<span>{translate(translations, 'by', 'By')}</span>
|
|
58
59
|
</p>
|
|
59
60
|
)}
|
|
60
|
-
|
|
61
|
-
{author?.name}
|
|
62
|
-
|
|
61
|
+
{showAuthorAsLink ? (
|
|
62
|
+
<Link to={author?.profile_page_path} title={author?.name}>
|
|
63
|
+
{author?.name}
|
|
64
|
+
</Link>
|
|
65
|
+
) : (
|
|
66
|
+
<span>{author?.name}</span>
|
|
67
|
+
)}
|
|
63
68
|
{showDate && <span className={styles.noLink}>{formatedDate}</span>}
|
|
64
69
|
</div>
|
|
65
70
|
</div>
|
|
@@ -87,6 +92,7 @@ ArticleCard.propTypes = {
|
|
|
87
92
|
height: PropTypes.number,
|
|
88
93
|
showAuthorOnOneLine: PropTypes.bool,
|
|
89
94
|
showDate: PropTypes.bool,
|
|
95
|
+
showAuthorAsLink: PropTypes.bool,
|
|
90
96
|
};
|
|
91
97
|
|
|
92
98
|
export default ArticleCard;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable react/prop-types */
|
|
3
3
|
/* eslint-disable no-nested-ternary */
|
|
4
4
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
5
|
-
import React, { useContext
|
|
5
|
+
import React, { useContext } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
8
8
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
@@ -13,7 +13,6 @@ import { imagePrettyUrl, translate, getAltText } from '~helpers/getters';
|
|
|
13
13
|
import styles from './oeprator-exlusive.module.scss';
|
|
14
14
|
|
|
15
15
|
const Banner = ({ bonus, template }) => {
|
|
16
|
-
const [showTracker, setShowTracker] = useState('');
|
|
17
16
|
const { value, module_title } = bonus;
|
|
18
17
|
const [, reviewPath] = value.review_link.split('.co.za/');
|
|
19
18
|
const splitBy = module_title?.includes('OR') ? 'OR' : module_title?.includes('+') ? '+' : '&';
|
|
@@ -22,16 +21,7 @@ const Banner = ({ bonus, template }) => {
|
|
|
22
21
|
: bonus?.value?.one_liners?.main?.one_liner.split('+');
|
|
23
22
|
const { translations } = useContext(Context) || {};
|
|
24
23
|
const imageObject = value?.standardised_logo_url_object || value?.logo_url_object;
|
|
25
|
-
|
|
26
|
-
const isMobile = isMobileDevice();
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (isMobile) {
|
|
30
|
-
setShowTracker('mobbanner');
|
|
31
|
-
} else {
|
|
32
|
-
setShowTracker('banner');
|
|
33
|
-
}
|
|
34
|
-
}, [isMobile]);
|
|
24
|
+
const tracker = isMobileDevice() ? 'mobbanner' : 'banner';
|
|
35
25
|
|
|
36
26
|
return (
|
|
37
27
|
<div className={`${styles.wrapper}`}>
|
|
@@ -68,7 +58,7 @@ const Banner = ({ bonus, template }) => {
|
|
|
68
58
|
inactive: { translationKey: 'inactive', defaultValue: 'Not Accepting New Players' },
|
|
69
59
|
blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
|
|
70
60
|
}}
|
|
71
|
-
tracker={
|
|
61
|
+
tracker={tracker}
|
|
72
62
|
gtmClass="banner-operator-cta-gtm"
|
|
73
63
|
pageTemplate={template}
|
|
74
64
|
/>
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from 'gatsby-core-theme/src/helpers/getters';
|
|
13
13
|
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
14
14
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
15
|
-
import { isMobileDevice } from '
|
|
15
|
+
import { isMobileDevice } from 'gatsby-core-theme/src/helpers/device-detect';
|
|
16
16
|
|
|
17
17
|
import styles from './small-welcome-bonus.module.scss';
|
|
18
18
|
|
|
@@ -20,12 +20,11 @@ const Index = ({ page }) => {
|
|
|
20
20
|
const operator = page?.extra_fields?.game_review_summary_operator;
|
|
21
21
|
const { logo_url, status } = operator;
|
|
22
22
|
const { translations } = useContext(Context) || {};
|
|
23
|
-
const isMobile = isMobileDevice();
|
|
24
23
|
const prettyLink = prettyTracker(operator, 'main', false, page.template);
|
|
25
24
|
let playNow = translate(translations, 'play_now', 'Play now');
|
|
26
25
|
const bonus = getBonus('main', operator);
|
|
27
26
|
const logUrlObject = operator?.logo_url_object;
|
|
28
|
-
if (
|
|
27
|
+
if (isMobileDevice()) {
|
|
29
28
|
playNow = `> ${translate(translations, 'play_for_real_at', 'Play for real at')} @ ${
|
|
30
29
|
operator.name
|
|
31
30
|
}`;
|
|
@@ -11,10 +11,10 @@ import PropTypes from 'prop-types';
|
|
|
11
11
|
import { MdClose } from '@react-icons/all-files/md/MdClose';
|
|
12
12
|
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
13
13
|
import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
14
|
+
import { isMobileDevice } from 'gatsby-core-theme/src/helpers/device-detect';
|
|
14
15
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
15
16
|
import PopupCard from '../../atoms/cards/popup-card';
|
|
16
17
|
import { setIdleTimeout } from '../../../helpers/popup';
|
|
17
|
-
import { isMobileDevice } from '../../../helpers/mobile-detect';
|
|
18
18
|
import months from '../../../constants/months';
|
|
19
19
|
|
|
20
20
|
import styles from './popup.module.scss';
|
|
@@ -10,7 +10,6 @@ import Slide from '../../../../components/molecules/carousel/screenshot-slide';
|
|
|
10
10
|
import styles from './carousel.module.scss';
|
|
11
11
|
|
|
12
12
|
const Carousel = ({ page = {}, module = {}, settings = {}, gtmClass = '' }) => {
|
|
13
|
-
const isMobile = isMobileDevice();
|
|
14
13
|
// render one item per slide
|
|
15
14
|
const renderOne = (items) => {
|
|
16
15
|
const arr = [];
|
|
@@ -53,7 +52,7 @@ const Carousel = ({ page = {}, module = {}, settings = {}, gtmClass = '' }) => {
|
|
|
53
52
|
return arr;
|
|
54
53
|
};
|
|
55
54
|
|
|
56
|
-
const renderedItems =
|
|
55
|
+
const renderedItems = isMobileDevice() ? renderOne(module.items) : renderTwo(module.items);
|
|
57
56
|
|
|
58
57
|
return (
|
|
59
58
|
<div className={styles.carouselContainer}>
|