Skip to content

Commit b87a187

Browse files
committed
fix TS error
1 parent 2ec1039 commit b87a187

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

packages/next-contentlayer/src/hooks/useMDXComponent.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ type MDXContentProps = {
1919
components?: MDXComponents
2020
}
2121

22-
export const getMDXComponent = (
23-
code: string,
24-
globals: Record<string, unknown> = {},
25-
): React.ComponentType<MDXContentProps> => {
22+
export const getMDXComponent = (code: string, globals: Record<string, unknown> = {}): React.FC<MDXContentProps> => {
2623
const scope = { React, ReactDOM, _jsx_runtime, ...globals }
2724
const fn = new Function(...Object.keys(scope), code)
2825
return fn(...Object.values(scope)).default

0 commit comments

Comments
 (0)