Skip to content

Commit

Permalink
Volto 12 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Mar 5, 2021
1 parent 82a2708 commit d28ef95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/PrivacyProtection/PrivacyProtection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import VisibilitySensor from 'react-visibility-sensor';
import { Placeholder } from 'semantic-ui-react';
import cookie from 'react-cookie';
import { Button, Checkbox, Message } from 'semantic-ui-react';
import { settings } from '~/config';
import config from '@plone/volto/registry';

import '../css/embed-styles.css';

const key = (domain_key) => `accept-${domain_key}`;

const getExpDays = () =>
typeof settings.embedCookieExpirationDays !== 'undefined'
? settings.embedCookieExpirationDays
typeof config.settings.embedCookieExpirationDays !== 'undefined'
? config.settings.embedCookieExpirationDays
: 90;

function saveCookie(domain_key) {
Expand Down Expand Up @@ -87,7 +87,7 @@ export default ({ children, data = {}, block, ...rest }) => {

<p className="discreet">
Your choice will be saved in a cookie managed by{' '}
{settings.ownDomain || '.eea.europa.eu'} that will expire in{' '}
{config.settings.ownDomain || '.eea.europa.eu'} that will expire in{' '}
{getExpDays()} days.
</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/PrivacyProtection/schema.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { settings } from '~/config';
import config from '@plone/volto/registry';

export const ProtectionSchema = () => ({
title: 'Data Protection',
Expand All @@ -15,7 +15,7 @@ export const ProtectionSchema = () => ({
privacy_statement: {
title: 'Privacy statement',
description: 'Short notification text',
widget: settings.defaultBlockType, // TODO: is it really applied?
widget: config.settings.defaultBlockType, // TODO: is it really applied?
},
privacy_cookie_key: {
title: 'Privacy cookie key',
Expand Down

0 comments on commit d28ef95

Please sign in to comment.