Removed shamefully-hoist and updated all packages to respect that
This commit is contained in:
@@ -28,7 +28,8 @@
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@kit/ui": "*"
|
||||
"@kit/ui": "*",
|
||||
"mdx": "0.3.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
import type { MDXComponents as MDXComponentsType } from 'mdx/types';
|
||||
import { getMDXComponent } from 'next-contentlayer/hooks';
|
||||
|
||||
import { MDXComponents } from '@kit/ui/mdx-components';
|
||||
|
||||
export function Mdx({
|
||||
code,
|
||||
}: React.PropsWithChildren<{
|
||||
code: string;
|
||||
}>) {
|
||||
export function Mdx({ code }: { code: string }) {
|
||||
const Component = getMDXComponent(code);
|
||||
|
||||
return (
|
||||
<Component components={MDXComponents as unknown as MDXComponentsType} />
|
||||
);
|
||||
return <Component />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user