Skip to content

Commit

Permalink
Merge pull request #33 from eea/develop
Browse files Browse the repository at this point in the history
Temporary disable external routes config (test issue in demo).
  • Loading branch information
GhitaB authored Jun 13, 2023
2 parents ea6154f + 84c59f5 commit ac24ba0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.1.25](https://github.com/eea/volto-cca-policy/compare/0.1.24...0.1.25) - 13 June 2023

#### :hammer_and_wrench: Others

- Temporary disable external routes config (test issue in demo). [GhitaB - [`ea7ddfd`](https://github.com/eea/volto-cca-policy/commit/ea7ddfdb7311891d9e6f5946c2f6d4bca93cfef8)]
### [0.1.24](https://github.com/eea/volto-cca-policy/compare/0.1.23...0.1.24) - 12 June 2023

#### :hammer_and_wrench: Others
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-cca-policy",
"version": "0.1.24",
"version": "0.1.25",
"description": "@eeacms/volto-cca-policy: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
33 changes: 17 additions & 16 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,23 @@ import GeocharsWidget from './components/theme/Widgets/GeocharsWidget';
import GeolocationWidget from './components/theme/Widgets/GeolocationWidget';

const applyConfig = (config) => {
const notInEnMission = /^(?!(\/en\/mission)).*$/;
if (!__DEVELOPMENT__ && !process.env.RAZZLE_DISABLE_EXTERNAL_ROUTES) {
config.settings.externalRoutes = [
...(config.settings.externalRoutes || []),
{
match: {
path: notInEnMission,
exact: false,
strict: false,
},
url(payload) {
return payload.location.pathname;
},
},
];
}
// const notInEnMission = /^(?!(\/en\/mission)).*$/;
// WIP, test redirect issue (do not deploy in production)
// if (!__DEVELOPMENT__ && !process.env.RAZZLE_DISABLE_EXTERNAL_ROUTES) {
// config.settings.externalRoutes = [
// ...(config.settings.externalRoutes || []),
// {
// match: {
// path: notInEnMission,
// exact: false,
// strict: false,
// },
// url(payload) {
// return payload.location.pathname;
// },
// },
// ];
// }

config.settings.loadables.d3 = loadable.lib(() => import('d3'));

Expand Down

0 comments on commit ac24ba0

Please sign in to comment.