diff --git a/admin/src/components/CMEditView/RightLinksCompo/SeoChecks/OpenGraphCheck/index.jsx b/admin/src/components/CMEditView/RightLinksCompo/SeoChecks/OpenGraphCheck/index.jsx index d8e7d02..01aeb7d 100644 --- a/admin/src/components/CMEditView/RightLinksCompo/SeoChecks/OpenGraphCheck/index.jsx +++ b/admin/src/components/CMEditView/RightLinksCompo/SeoChecks/OpenGraphCheck/index.jsx @@ -3,9 +3,6 @@ import { useIntl } from 'react-intl'; import isEqual from 'lodash/isEqual'; import isNull from 'lodash/isNull'; -import isEmpty from 'lodash/isEmpty'; - -import { Box, Badge, Flex } from '@strapi/design-system'; import { SEOAccordion } from '../SEOAccordion'; import { SeoCheckerContext } from '../../Summary'; @@ -31,7 +28,7 @@ export const OpenGraphCheck = ({ openGraph, checks }) => { }), qualityVerdict: qualityVerdict.bad, }; - } else if (!openGraph['og:title'] || !openGraph['og:description'] || !openGraph['og:image']) { + } else if (!openGraph['ogTitle'] || !openGraph['ogDescription'] || !openGraph['ogImage']) { status = { message: formatMessage({ id: getTrad('SEOChecks.openGraphCheck.not-configured'), diff --git a/admin/src/components/CMEditView/RightLinksCompo/Summary/OpenGraphPreview/index.jsx b/admin/src/components/CMEditView/RightLinksCompo/Summary/OpenGraphPreview/index.jsx index fc4539c..b78f1d0 100644 --- a/admin/src/components/CMEditView/RightLinksCompo/Summary/OpenGraphPreview/index.jsx +++ b/admin/src/components/CMEditView/RightLinksCompo/Summary/OpenGraphPreview/index.jsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { useIntl } from 'react-intl'; -import { Box, Flex, Typography, EmptyStateLayout, Badge, Modal } from '@strapi/design-system'; +import { Badge, Box, EmptyStateLayout, Flex, Modal, Typography } from '@strapi/design-system'; import { Illo } from '../../../../HomePage/Main/EmptyComponentLayout/illo'; @@ -26,7 +26,7 @@ export const OpenGraphPreview = ({ modifiedData }) => { - {openGraph['og:title'] && openGraph['og:description'] && openGraph['og:image'] ? ( + {openGraph['ogTitle'] && openGraph['ogDescription'] && openGraph['ogImage'] ? ( <> @@ -36,9 +36,9 @@ export const OpenGraphPreview = ({ modifiedData }) => { @@ -48,9 +48,9 @@ export const OpenGraphPreview = ({ modifiedData }) => { @@ -60,9 +60,9 @@ export const OpenGraphPreview = ({ modifiedData }) => { ) : ( diff --git a/admin/src/components/CMEditView/utils/checks.js b/admin/src/components/CMEditView/utils/checks.js index e173268..2ec6996 100644 --- a/admin/src/components/CMEditView/utils/checks.js +++ b/admin/src/components/CMEditView/utils/checks.js @@ -208,7 +208,7 @@ export const openGraphPreview = (modifiedData) => { qualityVerdict: qualityVerdict.bad, }; return status; - } else if (!openGraph['og:title'] || !openGraph['og:description'] || !openGraph['og:image']) { + } else if (!openGraph['ogTitle'] || !openGraph['ogDescription'] || !openGraph['ogImage']) { status = { message: '', qualityVerdict: qualityVerdict.improvements, diff --git a/server/src/components/open-graph.json b/server/src/components/open-graph.json index 700fcbf..171778e 100644 --- a/server/src/components/open-graph.json +++ b/server/src/components/open-graph.json @@ -6,30 +6,30 @@ }, "options": {}, "attributes": { - "og:title": { + "ogTitle": { "type": "string", "required": true, "maxLength": 70 }, - "og:description": { + "ogDescription": { "type": "string", "maxLength": 200, "required": true }, - "og:image": { + "ogImage": { "allowedTypes": [ "images" ], "type": "media", "multiple": false }, - "og:url": { + "ogUrl": { "type": "string", "required": false }, - "og:type": { + "ogType": { "type": "string", "required": false } } -} \ No newline at end of file +}