Skip to content

Commit

Permalink
Latest volto compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Oct 4, 2021
1 parent 6815a24 commit 414ff05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 30 deletions.
34 changes: 6 additions & 28 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,10 @@
* }
*/

import {
settings as defaultSettings,
views as defaultViews,
widgets as defaultWidgets,
blocks as defaultBlocks,
addonReducers as defaultAddonReducers,
addonRoutes as defaultAddonRoutes,
} from '@plone/volto/config';
// All your imports required for the config here BEFORE this line
import '@plone/volto/config';

export const settings = {
...defaultSettings,
};

export const views = {
...defaultViews,
};

export const widgets = {
...defaultWidgets,
};

export const blocks = {
...defaultBlocks,
};

export const addonRoutes = [...defaultAddonRoutes];
export const addonReducers = { ...defaultAddonReducers };

export const portlets = {};
export default function applyConfig(config) {
// Add here your project's configuration here by modifying `config` accordingly
return config;
}
4 changes: 2 additions & 2 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { App } from '@plone/volto/components';
import { defaultRoutes } from '@plone/volto/routes';
import { addonRoutes } from '~/config';
import config from '@plone/volto/registry';

/**
* Routes array.
Expand All @@ -19,7 +19,7 @@ const routes = [
routes: [
// Add your routes here
// addon routes have a higher priority then default routes
...(addonRoutes || []),
...(config.addonRoutes || []),
...defaultRoutes,
],
},
Expand Down

0 comments on commit 414ff05

Please sign in to comment.