diff --git a/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx b/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx index 168781b8a..0232dd24e 100644 --- a/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx +++ b/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx @@ -8,7 +8,7 @@ import { compose } from 'redux'; import { injectIntl, defineMessages } from 'react-intl'; import { injectDNDSubblocks, SubblockEdit, Subblock } from 'volto-subblocks'; - +import { UniversalLink } from '@plone/volto/components'; import { Button } from 'design-react-kit'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; @@ -146,11 +146,11 @@ class EditBlock extends SubblockEdit { {this.props.data.href && (
- + {this.props.data.linkMoreTitle || this.props.intl.formatMessage(messages.vedi)} - +
)} diff --git a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx index 6a6a42a3a..44b7a7b28 100644 --- a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +++ b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx @@ -9,6 +9,7 @@ import redraft from 'redraft'; import { useIntl, defineMessages } from 'react-intl'; import cx from 'classnames'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import { UniversalLink } from '@plone/volto/components'; import config from '@plone/volto/registry'; const messages = defineMessages({ @@ -66,10 +67,10 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => { {data.href && (
- + {data.linkMoreTitle || intl.formatMessage(messages.vedi)} - +
)} diff --git a/src/components/ItaliaTheme/Blocks/VideoGallery/Body.jsx b/src/components/ItaliaTheme/Blocks/VideoGallery/Body.jsx index 5651d6a23..9f0e8ff14 100644 --- a/src/components/ItaliaTheme/Blocks/VideoGallery/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/VideoGallery/Body.jsx @@ -10,6 +10,7 @@ import { Container } from 'design-react-kit'; import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import { UniversalLink } from '@plone/volto/components'; /** * View Video Gallery body class @@ -61,13 +62,13 @@ const Body = ({ data, children, nItems = 0, reactSlick }) => {
{data.channel_link ? ( - {data.channel_link_title || data.channel_link} - + ) : ( {data.channel_link_title} )} diff --git a/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx b/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx index 4b20058c5..c4f3ee8e8 100644 --- a/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +++ b/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx @@ -5,6 +5,7 @@ import AccordionView from '../Accordion/View'; import configureStore from 'redux-mock-store'; import { Provider } from 'react-intl-redux'; import thunk from 'redux-thunk'; +import { MemoryRouter } from 'react-router-dom'; const middlewares = [thunk]; const mockStore = configureStore(middlewares); @@ -59,7 +60,9 @@ const store = mockStore({ test('View renders all fields', async () => { render( - + + + , ); diff --git a/src/components/ItaliaTheme/Footer/FooterSmall.jsx b/src/components/ItaliaTheme/Footer/FooterSmall.jsx index 74d9d8594..9e7f00d57 100644 --- a/src/components/ItaliaTheme/Footer/FooterSmall.jsx +++ b/src/components/ItaliaTheme/Footer/FooterSmall.jsx @@ -3,7 +3,7 @@ * @module components/theme/Footer/FooterSmall */ -import React, { useState, useEffect } from 'react'; +import React, { useEffect } from 'react'; import cx from 'classnames'; import { UniversalLink } from '@plone/volto/components'; import { defineMessages, useIntl } from 'react-intl'; @@ -35,22 +35,17 @@ const FooterSmall = () => { const intl = useIntl(); const pathname = useLocation().pathname; const dispatch = useDispatch(); - const [links, setLinks] = useState([]); const subFooter = useSelector((state) => state.subFooter?.result); const subFooterItems = getItemsByPath(subFooter, pathname)?.filter( (item) => item.visible, ); - useEffect(() => { - dispatch(getSubFooter()); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + const links = getSiteProperty('smallFooterLinks', intl.locale) ?? []; useEffect(() => { - let _links = getSiteProperty('smallFooterLinks', intl.locale) ?? []; - setLinks(_links); - }, [intl.locale]); + dispatch(getSubFooter()); + }, [dispatch]); return subFooterItems?.length > 0 || links.length > 0 || true ? (
@@ -70,11 +65,7 @@ const FooterSmall = () => { })} key={url + index} > - + {item.title} @@ -83,9 +74,7 @@ const FooterSmall = () => { {links?.length > 0 && links.map((link) => (
  • - - {link.title} - + {link.title}
  • ))}
  • @@ -95,7 +84,6 @@ const FooterSmall = () => { e.preventDefault(); dispatch(displayBanner(true, true)); }} - title={intl.formatMessage(messages.cookieSettings)} > {intl.formatMessage(messages.cookieSettings)} diff --git a/src/components/ItaliaTheme/View/Commons/LocationsMap.jsx b/src/components/ItaliaTheme/View/Commons/LocationsMap.jsx index 4d9ce6735..4b75fb8ca 100644 --- a/src/components/ItaliaTheme/View/Commons/LocationsMap.jsx +++ b/src/components/ItaliaTheme/View/Commons/LocationsMap.jsx @@ -5,6 +5,7 @@ import { getContent, resetContent } from '@plone/volto/actions'; import { flattenToAppURL } from '@plone/volto/helpers'; import { OSMMap } from 'volto-venue'; import PropTypes from 'prop-types'; +import { UniversalLink } from '@plone/volto/components'; /** * LocationsMap view component class. @@ -62,7 +63,7 @@ const LocationsMap = ({ center, locations }) => { ); diff --git a/src/components/ItaliaTheme/View/Commons/Sponsors.jsx b/src/components/ItaliaTheme/View/Commons/Sponsors.jsx index 79c2bcc68..bd91a5b5f 100644 --- a/src/components/ItaliaTheme/View/Commons/Sponsors.jsx +++ b/src/components/ItaliaTheme/View/Commons/Sponsors.jsx @@ -5,6 +5,7 @@ import { searchContent, resetSearchContent } from '@plone/volto/actions'; import { flattenToAppURL } from '@plone/volto/helpers'; import PropTypes from 'prop-types'; import Image from '@plone/volto/components/theme/Image/Image'; +import { UniversalLink } from '@plone/volto/components'; const messages = defineMessages({ sponsors: { @@ -44,14 +45,14 @@ const Sponsor = ({ item }) => {
  • ) : (
    - {item.title} - +
    )} diff --git a/src/components/ItaliaTheme/manage/Widgets/CanaleDigitaleWidget.jsx b/src/components/ItaliaTheme/manage/Widgets/CanaleDigitaleWidget.jsx index ec1c84a20..d08a2fba4 100644 --- a/src/components/ItaliaTheme/manage/Widgets/CanaleDigitaleWidget.jsx +++ b/src/components/ItaliaTheme/manage/Widgets/CanaleDigitaleWidget.jsx @@ -3,6 +3,7 @@ import { Form } from 'semantic-ui-react'; import config from '@plone/volto/registry'; import cx from 'classnames'; import { defineMessages, injectIntl } from 'react-intl'; +import { UniversalLink } from '@plone/volto/components'; const messages = defineMessages({ canale_digitale_widget_title: { @@ -33,14 +34,9 @@ const CanaleDigitaleWidget = (props) => {

    Sezione obbligatoria ai fini della validazione AGID secondo i seguenti{' '} - + termini - + . Per confermare la presenza in pagina della relativa sezione devono essere presenti: