diff --git a/src/__tests__/mountSpec.js b/src/__tests__/mountSpec.js index 5794d1e..b987444 100644 --- a/src/__tests__/mountSpec.js +++ b/src/__tests__/mountSpec.js @@ -143,7 +143,7 @@ describe('UIAtoms mount rendering', () => { describe('should render atoms without noscript tag - disabled by $Settings: ', () => { let mountOptions = getComponentOptions({ plugin: { - imaUiAtoms: { + uiAtoms: { useIntersectionObserver: { iframes: true, images: true, @@ -185,7 +185,7 @@ describe('UIAtoms mount rendering', () => { describe('should render atoms with noscript tag - disabled by $Settings, overriden by props: ', () => { let mountOptions = getComponentOptions({ plugin: { - imaUiAtoms: { + uiAtoms: { useIntersectionObserver: { iframes: true, images: true, @@ -237,7 +237,7 @@ describe('UIAtoms mount rendering', () => { describe('should render atoms without noscript tag - enabled by $Settings, overriden by props: ', () => { let mountOptions = getComponentOptions({ plugin: { - imaUiAtoms: { + uiAtoms: { useIntersectionObserver: { iframes: true, images: true, diff --git a/src/iframe/HtmlIframe.jsx b/src/iframe/HtmlIframe.jsx index cc3cb28..ceb2a78 100644 --- a/src/iframe/HtmlIframe.jsx +++ b/src/iframe/HtmlIframe.jsx @@ -47,18 +47,13 @@ export default class HtmlIframe extends React.PureComponent { get useIntersectionObserver() { return this.props.useIntersectionObserver !== undefined ? this.props.useIntersectionObserver - : this._settings.plugin.imaUiAtoms.useIntersectionObserver.iframes !== - undefined - ? this._settings.plugin.imaUiAtoms.useIntersectionObserver.iframes - : this._settings.plugin.imaUiAtoms.useIntersectionObserver; + : this._settings.plugin.uiAtoms.useIntersectionObserver.iframes; } get disableNoScript() { return this.props.disableNoScript !== undefined ? this.props.disableNoScript - : this._settings.plugin.imaUiAtoms.disableNoScript.iframes !== undefined - ? this._settings.plugin.imaUiAtoms.disableNoScript.iframes - : this._settings.plugin.imaUiAtoms.disableNoScript; + : this._settings.plugin.uiAtoms.disableNoScript.iframes; } componentDidMount() { diff --git a/src/image/HtmlImage.jsx b/src/image/HtmlImage.jsx index 4ac7646..87f563d 100644 --- a/src/image/HtmlImage.jsx +++ b/src/image/HtmlImage.jsx @@ -64,18 +64,13 @@ export default class HtmlImage extends React.PureComponent { get useIntersectionObserver() { return this.props.useIntersectionObserver !== undefined ? this.props.useIntersectionObserver - : this._settings.plugin.imaUiAtoms.useIntersectionObserver.images !== - undefined - ? this._settings.plugin.imaUiAtoms.useIntersectionObserver.images - : this._settings.plugin.imaUiAtoms.useIntersectionObserver; + : this._settings.plugin.uiAtoms.useIntersectionObserver.images; } get disableNoScript() { return this.props.disableNoScript !== undefined ? this.props.disableNoScript - : this._settings.plugin.imaUiAtoms.disableNoScript.images !== undefined - ? this._settings.plugin.imaUiAtoms.disableNoScript.images - : this._settings.plugin.imaUiAtoms.disableNoScript; + : this._settings.plugin.uiAtoms.disableNoScript.images; } componentDidMount() { diff --git a/src/main.js b/src/main.js index 6118fde..5a2592b 100644 --- a/src/main.js +++ b/src/main.js @@ -105,7 +105,7 @@ const initSettings = () => { return { prod: { plugin: { - imaUiAtoms: { + uiAtoms: { useIntersectionObserver: { iframes: true, images: true, diff --git a/src/mocks/settings.js b/src/mocks/settings.js index f2f0df3..ba9dfa3 100644 --- a/src/mocks/settings.js +++ b/src/mocks/settings.js @@ -1,6 +1,6 @@ const settings = { plugin: { - imaUiAtoms: { + uiAtoms: { useIntersectionObserver: { iframes: true, images: true, diff --git a/src/video/HtmlVideo.jsx b/src/video/HtmlVideo.jsx index e5193b1..e75bb75 100644 --- a/src/video/HtmlVideo.jsx +++ b/src/video/HtmlVideo.jsx @@ -45,18 +45,13 @@ export default class HtmlVideo extends React.PureComponent { get useIntersectionObserver() { return this.props.useIntersectionObserver !== undefined ? this.props.useIntersectionObserver - : this._settings.plugin.imaUiAtoms.useIntersectionObserver.videos !== - undefined - ? this._settings.plugin.imaUiAtoms.useIntersectionObserver.videos - : this._settings.plugin.imaUiAtoms.useIntersectionObserver; + : this._settings.plugin.uiAtoms.useIntersectionObserver.videos; } get disableNoScript() { return this.props.disableNoScript !== undefined ? this.props.disableNoScript - : this._settings.plugin.imaUiAtoms.disableNoScript.videos !== undefined - ? this._settings.plugin.imaUiAtoms.disableNoScript.videos - : this._settings.plugin.imaUiAtoms.disableNoScript; + : this._settings.plugin.uiAtoms.disableNoScript.videos; } render() {