diff --git a/news/27.bugfix b/news/27.bugfix new file mode 100644 index 0000000..7d74a09 --- /dev/null +++ b/news/27.bugfix @@ -0,0 +1,2 @@ +Fix Uncaught TypeError on view: "`intl` is undefined". +@mauritsvanrees diff --git a/src/components/View.jsx b/src/components/View.jsx index f8f85d7..10e5d0c 100644 --- a/src/components/View.jsx +++ b/src/components/View.jsx @@ -1,11 +1,13 @@ import React from 'react'; import config from '@plone/volto/registry'; +import { useSelector } from 'react-redux'; import { flattenToAppURL } from '@plone/volto/helpers'; import { DetachedTextBlockEditor } from '@plone/volto-slate/blocks/Text/DetachedTextBlockEditor'; import { TextBlockView } from '@plone/volto-slate/blocks/Text'; const View = (props) => { - const { data, isEditMode, intl } = props; + const { data, isEditMode } = props; + const intl = useSelector((state) => state.intl); const customSlateSettings = { ...props,