gatsby-matrix-theme 28.0.15 → 28.0.17

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,19 @@
1
+ ## [28.0.17](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v28.0.16...v28.0.17) (2023-08-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * cookie consent ([3cd2358](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3cd235838d89ab65a117baca8f769c495c489a02))
7
+ * cookie consent ([44dd78f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/44dd78f13f1c607a07fbcafda243dee9976688d6))
8
+ * update core version ([336cc4b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/336cc4b0e4e59f1769ce5cce110d5a2a6413c633))
9
+
10
+ ## [28.0.16](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v28.0.15...v28.0.16) (2023-08-09)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * some cookie style for site ([f601354](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f6013546ce38592d842a9e610531faf33945ea83))
16
+
1
17
  ## [28.0.15](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v28.0.14...v28.0.15) (2023-08-08)
2
18
 
3
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "28.0.15",
3
+ "version": "28.0.17",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@react-icons/all-files": "^4.1.0",
27
27
  "gatsby": "^5.11.0",
28
- "gatsby-core-theme": "25.0.13",
28
+ "gatsby-core-theme": "25.0.14",
29
29
  "gatsby-plugin-sharp": "^5.11.0",
30
30
  "gatsby-plugin-sitemap": "^3.3.0",
31
31
  "gatsby-transformer-sharp": "^5.11.0",
@@ -65,7 +65,8 @@
65
65
  border: var(--cookie-consent-first-button-border, 2px solid #262629);
66
66
 
67
67
  &:hover {
68
- background: none;
68
+ background: var(--cookie-consent-first-button-bg, white) !important;
69
+ background-color: var(--cookie-consent-first-button-bg, white) !important;
69
70
  }
70
71
  }
71
72
 
@@ -18,6 +18,7 @@ const CookieConsent = ({
18
18
  showOnScroll = true,
19
19
  settingsCookie,
20
20
  isPageHomepage,
21
+ type,
21
22
  cookieImage = '../../../images/cookie.png',
22
23
  children,
23
24
  cookieName = 'CookieConsent',
@@ -51,7 +52,7 @@ const CookieConsent = ({
51
52
  {!cookieAccepted && (
52
53
  <Sticky
53
54
  showOnScroll={showOnScroll}
54
- className={styles?.cookieConsent || ''}
55
+ className={`${styles?.cookieConsent || ''} ${type === 'operator' && styles.bottom}`}
55
56
  position={location}
56
57
  >
57
58
  <>
@@ -106,6 +107,7 @@ CookieConsent.propTypes = {
106
107
  acceptText: PropTypes.string,
107
108
  settingsCookie: PropTypes.bool,
108
109
  location: PropTypes.oneOf(['bottom', 'top']),
110
+ type: PropTypes.string,
109
111
  cookieName: PropTypes.string,
110
112
  showOnScroll: PropTypes.bool,
111
113
  isPageHomepage: PropTypes.bool,
@@ -10,7 +10,6 @@ import ScrollToTop from 'gatsby-core-theme/src/components/atoms/scroll-to-top';
10
10
  import Main from 'gatsby-core-theme/src/components/molecules/main';
11
11
  import Header from 'gatsby-core-theme/src/components/molecules/header';
12
12
  import Footer from '../../molecules/footer';
13
- import { getCookie } from '~helpers/cookies';
14
13
  import LinkMenu from '../../../../components/atoms/link-menu';
15
14
 
16
15
  function Body({ pageContext, children, excludeTemplateInPopup = [], hideOperatorBanner = false }) {
@@ -48,8 +47,6 @@ function Body({ pageContext, children, excludeTemplateInPopup = [], hideOperator
48
47
  const isHomePage = pageContext?.page && pageContext?.page.path === '/';
49
48
  const pageType = pageContext.page.relation_type;
50
49
  const is404 = pageContext.page.path.includes('404');
51
- const cookieConsentAccepted =
52
- (typeof window !== 'undefined' && Boolean(getCookie('CookieConsent'))) || false;
53
50
 
54
51
  const excOperator = navigation?.modules.find((module) => module.name === 'bonus');
55
52
  const Popup = pageContext?.marketSections?.popup
@@ -92,9 +89,7 @@ function Body({ pageContext, children, excludeTemplateInPopup = [], hideOperator
92
89
  const isPageHomepage =
93
90
  getAllMarketsHomepage()?.includes(pageContext?.page?.path) || pageContext?.page?.path === '/';
94
91
 
95
- const modalProvider = !cookieConsentAccepted || isPageHomepage;
96
-
97
- const Cookie = modalProvider ? loadable(() => import('../../organisms/cookie-consent')) : null;
92
+ const Cookie = loadable(() => import('../../organisms/cookie-consent'));
98
93
 
99
94
  return (
100
95
  <>
@@ -180,8 +175,6 @@ function Body({ pageContext, children, excludeTemplateInPopup = [], hideOperator
180
175
  template={template}
181
176
  settingsCookie
182
177
  isPageHomepage={isPageHomepage}
183
- modalProvider={modalProvider}
184
- cookieConsentAccepted={cookieConsentAccepted}
185
178
  >
186
179
  <p>
187
180
  We use cookies in order to optimise our site and improve your experience with us. By