diff --git a/apps/marketing/src/app/(marketing)/[content]/content.tsx b/apps/marketing/src/app/(marketing)/[content]/content.tsx
new file mode 100644
index 000000000..d263d8c35
--- /dev/null
+++ b/apps/marketing/src/app/(marketing)/[content]/content.tsx
@@ -0,0 +1,23 @@
+'use client';
+
+import Image from 'next/image';
+
+import type { DocumentTypes } from 'contentlayer/generated';
+import type { MDXComponents } from 'mdx/types';
+import { useMDXComponent } from 'next-contentlayer/hooks';
+
+const mdxComponents: MDXComponents = {
+ MdxNextImage: (props: { width: number; height: number; alt?: string; src: string }) => (
+
+ ),
+};
+
+export type ContentPageContentProps = {
+ document: DocumentTypes;
+};
+
+export const ContentPageContent = ({ document }: ContentPageContentProps) => {
+ const MDXContent = useMDXComponent(document.body.code);
+
+ return ;
+};
diff --git a/apps/marketing/src/app/(marketing)/[content]/page.tsx b/apps/marketing/src/app/(marketing)/[content]/page.tsx
index 38200d984..9bcc2b92d 100644
--- a/apps/marketing/src/app/(marketing)/[content]/page.tsx
+++ b/apps/marketing/src/app/(marketing)/[content]/page.tsx
@@ -1,12 +1,11 @@
-import Image from 'next/image';
import { notFound } from 'next/navigation';
import { allDocuments } from 'contentlayer/generated';
-import type { MDXComponents } from 'mdx/types';
-import { useMDXComponent } from 'next-contentlayer/hooks';
import { setupI18nSSR } from '@documenso/lib/client-only/providers/i18n.server';
+import { ContentPageContent } from './content';
+
export const dynamic = 'force-dynamic';
export const generateMetadata = ({ params }: { params: { content: string } }) => {
@@ -19,12 +18,6 @@ export const generateMetadata = ({ params }: { params: { content: string } }) =>
return { title: document.title };
};
-const mdxComponents: MDXComponents = {
- MdxNextImage: (props: { width: number; height: number; alt?: string; src: string }) => (
-
- ),
-};
-
/**
* A generic catch all page for the root level that checks for content layer documents.
*
@@ -39,11 +32,9 @@ export default async function ContentPage({ params }: { params: { content: strin
notFound();
}
- const MDXContent = useMDXComponent(post.body.code);
-
return (
-
+
);
}