Initial commit: ANOUMA website with Payload CMS, WebRTC meetings, and booking system
- Next.js 16 App Router site with the ANOUMA design system - Payload CMS (PostgreSQL) for offers, events, posts and page content - WebRTC video-call system with custom signaling server - SMTP email reminders and booking-request notifications - Customer accounts, calendar-based availability, and booking workflow
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import {
|
||||
RichText as LexicalRichText,
|
||||
type JSXConvertersFunction,
|
||||
} from "@payloadcms/richtext-lexical/react";
|
||||
import type { DefaultNodeTypes } from "@payloadcms/richtext-lexical";
|
||||
|
||||
const converters: JSXConvertersFunction<DefaultNodeTypes> = ({ defaultConverters }) => ({
|
||||
...defaultConverters,
|
||||
paragraph: ({ node, nodesToJSX }) => {
|
||||
const children = nodesToJSX({ nodes: node.children });
|
||||
if (!children?.length) return null;
|
||||
return <p className="text-lg leading-relaxed text-anouma-plum">{children}</p>;
|
||||
},
|
||||
heading: ({ node, nodesToJSX }) => {
|
||||
const children = nodesToJSX({ nodes: node.children });
|
||||
const Tag = node.tag;
|
||||
return (
|
||||
<Tag className="mt-4 font-serif text-3xl font-medium text-anouma-plum">{children}</Tag>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
type RichTextProps = {
|
||||
data: NonNullable<Parameters<typeof LexicalRichText>[0]["data"]>;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/** Renders a Payload Lexical richText field with the ANOUMA reading styles. */
|
||||
export function RichText({ data, className = "space-y-6" }: RichTextProps) {
|
||||
return <LexicalRichText data={data} converters={converters} className={className} />;
|
||||
}
|
||||
Reference in New Issue
Block a user