@jetshop/template-trend 5.14.6 → 5.14.7-prerelease.0

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.
@@ -0,0 +1,3 @@
1
+ .RegionName_r1biyodf{text-transform:uppercase;font-size:1rem;line-height:1.5rem;font-weight:600;margin:1rem 0 0.5rem 0;}
2
+
3
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetshop/template-trend",
3
- "version": "5.14.6",
3
+ "version": "5.14.7-prerelease.0",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "build": "react-scripts build",
@@ -45,11 +45,11 @@
45
45
  ]
46
46
  },
47
47
  "dependencies": {
48
- "@jetshop/core": "^5.14.6",
48
+ "@jetshop/core": "^5.14.7-prerelease.0",
49
49
  "@jetshop/flight-shortcodes": "^2.0.10",
50
- "@jetshop/intl": "^5.14.6",
51
- "@jetshop/react-scripts": "^5.14.6",
52
- "@jetshop/ui": "^5.14.6",
50
+ "@jetshop/intl": "^5.14.7-prerelease.0",
51
+ "@jetshop/react-scripts": "^5.14.7-prerelease.0",
52
+ "@jetshop/ui": "^5.14.7-prerelease.0",
53
53
  "@react-google-maps/api": "~1.7.0",
54
54
  "prop-types": "^15.6.2",
55
55
  "react": "^16.9.0",
@@ -1,9 +1,10 @@
1
- import React, { useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { styled } from 'linaria/react';
3
3
  import t from '@jetshop/intl';
4
4
  import { Link } from 'react-router-dom';
5
5
  import Button from './ui/Button';
6
6
  import { withCookies } from 'react-cookie';
7
+ import { useTracker } from '@jetshop/core/analytics/Analytics';
7
8
 
8
9
  const animationLength = 800;
9
10
 
@@ -64,15 +65,24 @@ const CookieConsent = ({ cookies }) => {
64
65
 
65
66
  const [visible, setVisible] = useState(cookieConsent !== 'agreed');
66
67
  const [unmounting, setUnmounting] = useState(false);
68
+ const track = useTracker();
67
69
 
68
70
  function agree() {
69
71
  cookies.set('cookieConsent', `agreed`);
70
72
  setUnmounting(true);
73
+ track({
74
+ name: 'consent'
75
+ });
71
76
  setTimeout(() => {
72
77
  setVisible(false);
73
78
  }, animationLength);
74
79
  }
75
80
 
81
+ useEffect(() => {
82
+ window.consent = agree;
83
+ // eslint-disable-next-line react-hooks/exhaustive-deps
84
+ }, []);
85
+
76
86
  return visible ? (
77
87
  <Wrapper className={unmounting ? 'unmounting' : ''}>
78
88
  <p>
@@ -76,6 +76,7 @@ const config = {
76
76
  Page: [ContentPage]
77
77
  }
78
78
  },
79
- usePrimaryRouteForProducts: false
79
+ usePrimaryRouteForProducts: false,
80
+ useTrackingConsentAPI: true
80
81
  };
81
82
  export default config;