@eeacms/volto-clms-theme 1.0.153 → 1.0.155

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
@@ -4,11 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- ### [1.0.153](https://github.com/eea/volto-clms-theme/compare/1.0.152...1.0.153) - 6 December 2022
7
+ ### [1.0.155](https://github.com/eea/volto-clms-theme/compare/1.0.154...1.0.155) - 12 December 2022
8
8
 
9
9
  #### :bug: Bug Fixes
10
10
 
11
- - fix: back button for tabs [ionlizarazu - [`a432882`](https://github.com/eea/volto-clms-theme/commit/a432882fd6685a4bb35717e330e6d17e3cd7479b)]
11
+ - fix:remove withRouter to avoid updating listing inside tabs [ionlizarazu - [`555ce4e`](https://github.com/eea/volto-clms-theme/commit/555ce4ed57d2c6653077bb5f3c9ba45bdfc10326)]
12
+
13
+ ### [1.0.154](https://github.com/eea/volto-clms-theme/compare/1.0.153...1.0.154) - 6 December 2022
14
+
15
+ #### :bug: Bug Fixes
16
+
17
+ - fix: back button on tabs [ionlizarazu - [`af674e5`](https://github.com/eea/volto-clms-theme/commit/af674e5862e674e12c9570b5436d5a6908059b5b)]
18
+
19
+ ### [1.0.153](https://github.com/eea/volto-clms-theme/compare/1.0.152...1.0.153) - 6 December 2022
12
20
 
13
21
  ### [1.0.152](https://github.com/eea/volto-clms-theme/compare/1.0.151...1.0.152) - 6 December 2022
14
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.153",
3
+ "version": "1.0.155",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { connect } from 'react-redux';
3
- import { withRouter } from 'react-router';
3
+ // import { withRouter } from 'react-router';
4
4
  import { NavLink, Route } from 'react-router-dom';
5
5
  import { compose } from 'redux';
6
6
 
@@ -120,4 +120,4 @@ export default compose(
120
120
  };
121
121
  }),
122
122
  withScrollToTarget,
123
- )(withRouter(CclVerticalTabsView));
123
+ )(CclVerticalTabsView);
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import { slugify } from '../../utils';
3
+ import { useSelector } from 'react-redux';
3
4
 
4
5
  const RoutingHOC = (TabView) =>
5
6
  function Component(props) {
6
7
  const { tabsList = [], tabs, activeTabIndex = 0, setActiveTab } = props;
8
+ const location = useSelector((state) => state.router.location);
7
9
 
8
10
  function reloadTab(window, rTabs, rTabsList) {
9
11
  if (
@@ -42,6 +44,7 @@ const RoutingHOC = (TabView) =>
42
44
  return '';
43
45
  }
44
46
  }
47
+
45
48
  React.useEffect(() => {
46
49
  const isReload =
47
50
  String(window.performance.getEntriesByType('navigation')[0].type) ===
@@ -53,7 +56,7 @@ const RoutingHOC = (TabView) =>
53
56
  if (existingTab) setActiveTab(existingTab);
54
57
  }
55
58
  // eslint-disable-next-line react-hooks/exhaustive-deps
56
- }, [activeTabIndex, window.location.hash]);
59
+ }, [activeTabIndex, location]);
57
60
 
58
61
  return <TabView {...props} />;
59
62
  };