gatsby-core-theme 33.0.0 → 33.0.2
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 +19 -0
- package/package.json +1 -1
- package/src/components/molecules/bonus/template-one/index.js +1 -1
- package/src/components/molecules/bonus/template-two/index.js +1 -1
- package/src/components/organisms/navigation/index.js +5 -2
- package/src/components/organisms/navigation/navigation.module.scss +1 -0
- package/src/components/organisms/navigation/navigation.test.js +1 -1
- package/src/components/organisms/search/index.js +3 -0
- package/src/components/organisms/search/search.module.scss +8 -0
- package/src/components/pages/body/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [33.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v33.0.1...v33.0.2) (2024-06-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update is disabled button ([91a0052](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/91a0052e25616642c1b21c61104d4c1ca6e18e2c))
|
|
7
|
+
* update styling of logo and search icon when on responsible gambling page template ([bb20215](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/bb20215cc7576ad37617bdaadc914e4f02f8d48f))
|
|
8
|
+
* update tests for navigation ([e5d7fcb](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e5d7fcbd1b368df50cdb32392c0d1baf8743b7ac))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
* Merge branch 'tm-4293-improvements-rg-template' into 'master' ([93c29e4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/93c29e4fde5faa137c92db8096ba334c75edd4e0))
|
|
12
|
+
|
|
13
|
+
## [33.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v33.0.0...v33.0.1) (2024-06-13)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* get the name from market first ([5f23499](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5f23499dda83e26cd536005b557e975e7e09a1e2))
|
|
19
|
+
|
|
1
20
|
# [33.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.6...v33.0.0) (2024-06-13)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -51,7 +51,7 @@ export default function Bonus({
|
|
|
51
51
|
width={width}
|
|
52
52
|
/>
|
|
53
53
|
<div className={styles.details}>
|
|
54
|
-
{name && <span>{name}</span>}
|
|
54
|
+
{(bonus?.operator_name || name) && <span>{bonus?.operator_name || name}</span>}
|
|
55
55
|
{(operator?.rating || bonus?.rating) && (
|
|
56
56
|
<Rating
|
|
57
57
|
rating={operator.rating || bonus?.rating}
|
|
@@ -72,7 +72,7 @@ export default function TemplateOne({
|
|
|
72
72
|
width={width}
|
|
73
73
|
/>
|
|
74
74
|
<div className={styles.details}>
|
|
75
|
-
{name && <span>{name}</span>}
|
|
75
|
+
{(bonus?.operator_name || name) && <span>{bonus?.operator_name || name}</span>}
|
|
76
76
|
{(operator?.rating || bonus?.rating) && (
|
|
77
77
|
<Rating
|
|
78
78
|
rating={operator?.rating || bonus?.rating}
|
|
@@ -30,6 +30,7 @@ const Navigation = ({
|
|
|
30
30
|
children,
|
|
31
31
|
customStyles,
|
|
32
32
|
hasCustomComponent = false,
|
|
33
|
+
isRGpage,
|
|
33
34
|
}) => {
|
|
34
35
|
const navRef = useRef(React.createRef());
|
|
35
36
|
const showMenu = template !== 'ppc';
|
|
@@ -74,7 +75,7 @@ const Navigation = ({
|
|
|
74
75
|
>
|
|
75
76
|
<nav className={styles.nav || ''} ref={navRef}>
|
|
76
77
|
<NavigationProvider>
|
|
77
|
-
{showMenu ? (
|
|
78
|
+
{showMenu && !isRGpage ? (
|
|
78
79
|
<Link
|
|
79
80
|
className={`${styles.logo || ''} main-menu-gtm logo-cta`}
|
|
80
81
|
aria-label="Nav Logo"
|
|
@@ -84,7 +85,7 @@ const Navigation = ({
|
|
|
84
85
|
{logoImg}
|
|
85
86
|
</Link>
|
|
86
87
|
) : (
|
|
87
|
-
logoImg
|
|
88
|
+
<div className={`${styles.logo || ''}`}>{logoImg}</div>
|
|
88
89
|
)}
|
|
89
90
|
{showMenu && (
|
|
90
91
|
<>
|
|
@@ -106,6 +107,7 @@ const Navigation = ({
|
|
|
106
107
|
pageContext={pageContext}
|
|
107
108
|
searchURLPageName={searchURLPageName}
|
|
108
109
|
marketPrefix={activeMarket?.path_prefix || '/'}
|
|
110
|
+
isDisabled={isRGpage}
|
|
109
111
|
/>
|
|
110
112
|
)}
|
|
111
113
|
{hasCustomComponent && (
|
|
@@ -154,6 +156,7 @@ Navigation.propTypes = {
|
|
|
154
156
|
children: PropTypes.node,
|
|
155
157
|
customStyles: PropTypes.shape({}),
|
|
156
158
|
hasCustomComponent: PropTypes.bool,
|
|
159
|
+
isRGpage: PropTypes.bool,
|
|
157
160
|
};
|
|
158
161
|
|
|
159
162
|
export default Navigation;
|
|
@@ -23,7 +23,7 @@ describe('Navigation Component', () => {
|
|
|
23
23
|
|
|
24
24
|
await waitFor(() => {
|
|
25
25
|
expect(container.querySelectorAll('.nav')).toBeTruthy();
|
|
26
|
-
expect(container.querySelectorAll('.logo')).toHaveLength(
|
|
26
|
+
expect(container.querySelectorAll('.logo')).toHaveLength(1);
|
|
27
27
|
expect(container.querySelectorAll('.menuContainer')).toHaveLength(0);
|
|
28
28
|
expect(container.querySelectorAll('.search')).toHaveLength(0);
|
|
29
29
|
});
|
|
@@ -17,6 +17,7 @@ const SearchForm = ({
|
|
|
17
17
|
iconHeight = 24,
|
|
18
18
|
placeholder = null,
|
|
19
19
|
marketPrefix = '/',
|
|
20
|
+
isDisabled,
|
|
20
21
|
}) => {
|
|
21
22
|
const [localSearch, setLocalSearch] = useState(false);
|
|
22
23
|
const [searchBoxQuery, setSearchBoxQuery] = useState();
|
|
@@ -59,6 +60,7 @@ const SearchForm = ({
|
|
|
59
60
|
className={`${styles.searchButton || ''} ${
|
|
60
61
|
localSearch && (styles.active || '')
|
|
61
62
|
} search-gtm btn-cta`}
|
|
63
|
+
disabled={isDisabled}
|
|
62
64
|
>
|
|
63
65
|
{searchIcon === null ? (
|
|
64
66
|
<FaSearch title="Search Icon" />
|
|
@@ -106,6 +108,7 @@ SearchForm.propTypes = {
|
|
|
106
108
|
pageContext: PropTypes.shape({}),
|
|
107
109
|
placeholder: PropTypes.string,
|
|
108
110
|
marketPrefix: PropTypes.string,
|
|
111
|
+
isDisabled: PropTypes.bool,
|
|
109
112
|
};
|
|
110
113
|
|
|
111
114
|
export default SearchForm;
|