From 9d4df14ef11a6d5f702a481e041b072e48e972c6 Mon Sep 17 00:00:00 2001 From: Kawtar Choubari Date: Tue, 5 Sep 2023 22:58:12 +0200 Subject: [PATCH] Fix Server Props error with ContentLayer and Next 13.4 --- components/mdx/mdx-components.tsx | 5 +++-- yarn.lock | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/mdx/mdx-components.tsx b/components/mdx/mdx-components.tsx index f1af27c..bf8a3aa 100644 --- a/components/mdx/mdx-components.tsx +++ b/components/mdx/mdx-components.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import "./mdx.css"; -import Image from "next/image"; +import Image, { ImageProps } from "next/image"; import { useMDXComponent } from "next-contentlayer/hooks"; import { Callout } from "@/components/mdx/callout"; @@ -172,7 +172,8 @@ const components = { {...props} /> ), - Image, + // Image, + Image: (props: ImageProps) => , Callout, Card: MdxCard, }; diff --git a/yarn.lock b/yarn.lock index d2992e8..c498ea4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1128,7 +1128,7 @@ config-chain@^1.1.13: contentlayer@^0.3.4: version "0.3.4" - resolved "https://registry.npmjs.org/contentlayer/-/contentlayer-0.3.4.tgz" + resolved "https://registry.yarnpkg.com/contentlayer/-/contentlayer-0.3.4.tgz#519ad446e38d533a2166a7bd3bd5188c5be019ab" integrity sha512-FYDdTUFaN4yqep0waswrhcXjmMJnPD5iXDTtxcUCGdklfuIrXM2xLx51xl748cHmGA6IsC+27YZFxU6Ym13QIA== dependencies: "@contentlayer/cli" "0.3.4" @@ -2673,7 +2673,7 @@ nanoid@^3.3.4, nanoid@^3.3.6: next-contentlayer@^0.3.4: version "0.3.4" - resolved "https://registry.npmjs.org/next-contentlayer/-/next-contentlayer-0.3.4.tgz" + resolved "https://registry.yarnpkg.com/next-contentlayer/-/next-contentlayer-0.3.4.tgz#dd88ff27bca94ec8c619d77d225a0b15f2e6ccb2" integrity sha512-UtUCwgAl159KwfhNaOwyiI7Lg6sdioyKMeh+E7jxx0CJ29JuXGxBEYmCI6+72NxFGIFZKx8lvttbbQhbnYWYSw== dependencies: "@contentlayer/core" "0.3.4"