From 82d310403c4bb09bc2f0a204b6374934a10cf348 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 29 Jan 2022 23:38:13 +0100 Subject: refactor(config): move config from config dir to utils --- src/components/Comment/Comment.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/components/Comment/Comment.tsx') diff --git a/src/components/Comment/Comment.tsx b/src/components/Comment/Comment.tsx index e95a378..4835f8c 100644 --- a/src/components/Comment/Comment.tsx +++ b/src/components/Comment/Comment.tsx @@ -1,7 +1,7 @@ import { Button } from '@components/Buttons'; import CommentForm from '@components/CommentForm/CommentForm'; -import { config } from '@config/website'; import { Comment as CommentData } from '@ts/types/comments'; +import { settings } from '@utils/config'; import { getFormattedDate } from '@utils/helpers/format'; import Head from 'next/head'; import Image from 'next/image'; @@ -23,7 +23,7 @@ const Comment = ({ }) => { const intl = useIntl(); const router = useRouter(); - const locale = router.locale ? router.locale : config.locales.defaultLocale; + const locale = router.locale ? router.locale : settings.locales.defaultLocale; const [isReply, setIsReply] = useState(false); const firstFieldRef = useRef(null); @@ -146,12 +146,12 @@ const Comment = ({ const schemaJsonLd: WithContext = { '@context': 'https://schema.org', - '@id': `${config.url}/#comment-${comment.commentId}`, + '@id': `${settings.url}/#comment-${comment.commentId}`, '@type': 'Comment', parentItem: isNested - ? { '@id': `${config.url}/#comment-${comment.parentDatabaseId}` } + ? { '@id': `${settings.url}/#comment-${comment.parentDatabaseId}` } : undefined, - about: { '@type': 'Article', '@id': `${config.url}/#article` }, + about: { '@type': 'Article', '@id': `${settings.url}/#article` }, author: { '@type': 'Person', name: comment.author.name, -- cgit v1.2.3