@eeacms/volto-cca-policy 0.3.60 → 0.3.62

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,18 @@ 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
- ### [0.3.60](https://github.com/eea/volto-cca-policy/compare/0.3.59...0.3.60) - 3 July 2025
7
+ ### [0.3.62](https://github.com/eea/volto-cca-policy/compare/0.3.61...0.3.62) - 4 July 2025
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Let's try again [Tiberiu Ichim - [`33edadf`](https://github.com/eea/volto-cca-policy/commit/33edadfcfaa23d294669fbe609bfa584673abf17)]
12
+ ### [0.3.61](https://github.com/eea/volto-cca-policy/compare/0.3.60...0.3.61) - 4 July 2025
8
13
 
9
14
  #### :hammer_and_wrench: Others
10
15
 
11
- - Let's try again [Tiberiu Ichim - [`bd4367a`](https://github.com/eea/volto-cca-policy/commit/bd4367af3b02f724e9ae6e9d14e0cd963dca4042)]
16
+ - Let's try again [Tiberiu Ichim - [`d9b56a6`](https://github.com/eea/volto-cca-policy/commit/d9b56a606ec6f2b8dd9658ae93eda9f87f478097)]
17
+ ### [0.3.60](https://github.com/eea/volto-cca-policy/compare/0.3.59...0.3.60) - 3 July 2025
18
+
12
19
  ### [0.3.59](https://github.com/eea/volto-cca-policy/compare/0.3.58...0.3.59) - 3 July 2025
13
20
 
14
21
  ### [0.3.58](https://github.com/eea/volto-cca-policy/compare/0.3.57...0.3.58) - 3 July 2025
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.60",
3
+ "version": "0.3.62",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -204,12 +204,21 @@ class View extends Component {
204
204
  render() {
205
205
  const { views } = config;
206
206
  if (this.props.error && this.props.error.code === 301) {
207
+ // const base = typeof window !== 'undefined' ? window.location.origin : '';
208
+
207
209
  const redirect = flattenToAppURL(this.props.error.url)
208
210
  .replaceAll('/++api++', '/')
211
+ .replaceAll('//', '/')
209
212
  .split('?')[0];
213
+ const redirParams = {
214
+ pathname: redirect,
215
+ search: this.props.location.search,
216
+ };
217
+
210
218
  // eslint-disable-next-line no-console
211
- console.log('Redirecting', redirect);
212
- return <Redirect to={`${redirect}${this.props.location.search}`} />;
219
+ console.log('Redirecting', redirParams);
220
+
221
+ return <Redirect to={redirParams} push={true} />;
213
222
  } else if (this.props.error && !this.props.connectionRefused) {
214
223
  let FoundView;
215
224
  if (this.props.error.status === undefined) {