gatsby-matrix-theme 3.2.22 → 3.2.23

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
+ ## [3.2.23](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.22...v3.2.23) (2022-02-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add scroll on footer nav ([da45e5d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/da45e5de716e6e6afd7f362c9f036309f6b8168f))
7
+ * add show after 3 seconds functionality on footer nav ([9e49a61](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9e49a61e531399b34d6e6b7f0ae5a0f945f3861e))
8
+ * fix carousel not showing when js is off ([f976424](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f976424bbcf1a2cad3a8a7d20e407dfd15b6c848))
9
+
10
+
11
+ * Merge branch 'tm-2684-footerNav-optimization' into 'master' ([fdeec64](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fdeec64fc8a922628107b33134577187b95d150e))
12
+ * Merge branch 'tm-2691-images-carousel' into 'master' ([90d05e0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/90d05e0d84b8d5f78f12691d7e03a9833e317eb3))
13
+
14
+
15
+ ### norelease
16
+
17
+ * change env sitename ([fa10ded](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fa10ded0f9d09b909eff2443d27281234ed39bce))
18
+ * revert back env ([9897255](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9897255ed23e4b714c99474d47000a91d00b223b))
19
+
1
20
  ## [3.2.22](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.21...v3.2.22) (2022-02-02)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "3.2.22",
3
+ "version": "3.2.23",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
4
  import LinkList from 'gatsby-core-theme/src/components/molecules/link-list';
@@ -6,8 +6,33 @@ import { getFirstModuleByName } from 'gatsby-core-theme/src/helpers/getters';
6
6
  import styles from './footer-navigation.module.scss';
7
7
 
8
8
  const FooterNavigation = ({ section, isStorybook = false }) => {
9
+ const [show, setShow] = useState(false);
9
10
  const menuArray = getFirstModuleByName(section, 'menu');
10
- return (
11
+
12
+ const handleEvent = () => {
13
+ setShow(true);
14
+ };
15
+
16
+ const showAfter = (seconds) => {
17
+ setTimeout(() => {
18
+ setShow(true);
19
+ }, seconds * 1000);
20
+ };
21
+
22
+ useEffect(() => {
23
+ window.addEventListener('scroll', handleEvent);
24
+ window.addEventListener('mousemove', handleEvent);
25
+ window.addEventListener('touchstart', handleEvent);
26
+ showAfter(3);
27
+
28
+ return () => {
29
+ window.removeEventListener('scroll', handleEvent);
30
+ window.addEventListener('mousemove', handleEvent);
31
+ window.addEventListener('touchstart', handleEvent);
32
+ };
33
+ }, []);
34
+
35
+ return show ? (
11
36
  <div className={`${styles.footerLinks} ${isStorybook && styles.storybookStyles}`}>
12
37
  <LinkList
13
38
  showListTitle={false}
@@ -19,7 +44,7 @@ const FooterNavigation = ({ section, isStorybook = false }) => {
19
44
  gtmClass="mobile-menu-gtm"
20
45
  />
21
46
  </div>
22
- );
47
+ ) : null;
23
48
  };
24
49
 
25
50
  FooterNavigation.propTypes = {
@@ -43,28 +43,19 @@ const Carousel = ({ module = {}, settings = {}, gtmClass = '' }) => {
43
43
  return arr;
44
44
  };
45
45
 
46
+ const renderedItems =
47
+ width < 991 && width > 0 ? renderOne(module.items) : renderTwo(module.items);
48
+
46
49
  return (
47
50
  <div className={styles.carouselContainer}>
48
- {width >= 991 && (
49
- <Slider
50
- {...settings}
51
- className={styles.screenshotCarousel}
52
- useArrows={false}
53
- gtmClass={gtmClass}
54
- >
55
- {renderTwo(module.items)}
56
- </Slider>
57
- )}
58
- {width < 991 && width > 0 && (
59
- <Slider
60
- {...settings}
61
- className={styles.screenshotCarousel}
62
- useArrows={false}
63
- gtmClass={gtmClass}
64
- >
65
- {renderOne(module.items)}
66
- </Slider>
67
- )}
51
+ <Slider
52
+ {...settings}
53
+ className={styles.screenshotCarousel}
54
+ useArrows={false}
55
+ gtmClass={gtmClass}
56
+ >
57
+ {renderedItems}
58
+ </Slider>
68
59
  </div>
69
60
  );
70
61
  };
@@ -135,4 +135,4 @@
135
135
 
136
136
 
137
137
 
138
- window['FEATURES'] = {"postcss":true};</script><script src="runtime~main.59fc7233.iframe.bundle.js"></script><script src="vendors~main.73d094d3.iframe.bundle.js"></script><script src="main.433816fa.iframe.bundle.js"></script></body></html>
138
+ window['FEATURES'] = {"postcss":true};</script><script src="runtime~main.59fc7233.iframe.bundle.js"></script><script src="vendors~main.73d094d3.iframe.bundle.js"></script><script src="main.1fb3ac74.iframe.bundle.js"></script></body></html>