@eeacms/volto-cca-policy 0.3.60 → 0.3.61

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,13 @@ 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.61](https://github.com/eea/volto-cca-policy/compare/0.3.60...0.3.61) - 4 July 2025
8
8
 
9
9
  #### :hammer_and_wrench: Others
10
10
 
11
- - Let's try again [Tiberiu Ichim - [`bd4367a`](https://github.com/eea/volto-cca-policy/commit/bd4367af3b02f724e9ae6e9d14e0cd963dca4042)]
11
+ - Let's try again [Tiberiu Ichim - [`d9b56a6`](https://github.com/eea/volto-cca-policy/commit/d9b56a606ec6f2b8dd9658ae93eda9f87f478097)]
12
+ ### [0.3.60](https://github.com/eea/volto-cca-policy/compare/0.3.59...0.3.60) - 3 July 2025
13
+
12
14
  ### [0.3.59](https://github.com/eea/volto-cca-policy/compare/0.3.58...0.3.59) - 3 July 2025
13
15
 
14
16
  ### [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.61",
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,16 @@ 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++', '/')
209
211
  .split('?')[0];
210
212
  // eslint-disable-next-line no-console
211
213
  console.log('Redirecting', redirect);
212
- return <Redirect to={`${redirect}${this.props.location.search}`} />;
214
+ return (
215
+ <Redirect to={`${base}${redirect}${this.props.location.search}`} />
216
+ );
213
217
  } else if (this.props.error && !this.props.connectionRefused) {
214
218
  let FoundView;
215
219
  if (this.props.error.status === undefined) {