Removed shamefully-hoist and updated all packages to respect that

This commit is contained in:
giancarlo
2024-04-10 01:45:03 +08:00
parent 9e1199f3f4
commit f729bf6077
33 changed files with 1504 additions and 1470 deletions

View File

@@ -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 />;
}