I am trying to style markdown files using Chakra UI in a next.js app. To that extent, I have created the following MDXComponents.tsx
file:
import { chakra } from "@chakra-ui/react"
const MDXComponents = {
p: (props) => <chakra.p fontSize="2xl" color="blue.500" {...props} />,
}
export default MDXComponents
I then import this file into _app.tsx
and everything works as I want it to. Nonetheless, I get the following error in the MDXComponents.tsx
file: Component definition is missing display name
:
Any idea why I am getting this error message and what I can do to fix it?
Thanks.