diff --git a/app/blog/[slug]/page.jsx b/app/blog/[slug]/page.jsx index 2229a54..534ee35 100644 --- a/app/blog/[slug]/page.jsx +++ b/app/blog/[slug]/page.jsx @@ -47,7 +47,6 @@ import Article from 'components/articles'; export default function BlogArticle({ params }) { const { slug } = params; - const { default: DefaultArticle, metadata } = require(`articles/${slug}.mdx`); return ( diff --git a/components/articles/content/index.jsx b/components/articles/content/index.jsx index 1bd5eaa..7c17d62 100644 --- a/components/articles/content/index.jsx +++ b/components/articles/content/index.jsx @@ -1,8 +1,8 @@ +'use client'; + import s from './content.module.css'; export default function ArticleContent({ children }) { - 'use client'; - return (
diff --git a/next.config.js b/next.config.mjs similarity index 97% rename from next.config.js rename to next.config.mjs index 910fa6c..28f6acc 100644 --- a/next.config.js +++ b/next.config.mjs @@ -1,4 +1,4 @@ -const withMDX = require('@next/mdx')() +import withMDX from '@next/mdx'; const contentSecurityPolicy = ` default-src 'self' https://*.googletagmanager.com https://*.google-analytics.com https://*.analytics.google.com https://*.vercel-insights.com https://vercel.live https://mateonunez.dev/; @@ -84,4 +84,4 @@ const nextConfig = { outputFileTracing: false, }; -module.exports = withMDX(nextConfig); +export default withMDX()(nextConfig);