SurfSense/surfsense_web/mdx-components.tsx
DESKTOP-RTLN3BA\$punk bd8821c489 feat: updated docs and fixed docker runtime vars injection
- Modified Dockerfile to use placeholder values for frontend environment variables, allowing for runtime substitution.
- Enhanced entrypoint script to apply runtime environment variable configuration, replacing placeholders in JavaScript files with actual values.
- Updated documentation paths in MDX files for Google OAuth images and added detailed setup guides for Discord, Linear, Notion, and Slack OAuth integrations.
2026-01-06 17:41:50 -08:00

33 lines
914 B
TypeScript

import defaultMdxComponents from "fumadocs-ui/mdx";
import type { MDXComponents } from "mdx/types";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
import { cn } from "@/lib/utils";
import Image, { type ImageProps } from "next/image";
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
...defaultMdxComponents,
img: ({ className, alt, ...props }: React.ComponentProps<"img">) => (
<Image
className={cn("rounded-md border", className)}
alt={alt ?? ""}
{...(props as ImageProps)}
/>
),
Video: ({ className, ...props }: React.ComponentProps<"video">) => (
<video className={cn("rounded-md border", className)} controls loop {...props} />
),
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent,
...components,
};
}
export const useMDXComponents = getMDXComponents;