fix: resolve html invalid nesting, english routing 404s, and nodemailer missing credentials
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Successful in 3m14s
Build & Deploy / 🏗️ Build (push) Failing after 2m43s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Successful in 3m14s
Build & Deploy / 🏗️ Build (push) Failing after 2m43s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
This commit is contained in:
@@ -49,11 +49,11 @@ const jsxConverters: JSXConverters = {
|
||||
const startsWithDash = text.trimStart().startsWith('- ');
|
||||
const prefix = startsWithDash ? null : parts.shift();
|
||||
return (
|
||||
<>
|
||||
<div className="my-4">
|
||||
{prefix && (
|
||||
<span dangerouslySetInnerHTML={prefix.includes('<') ? { __html: prefix } : undefined}>
|
||||
<div dangerouslySetInnerHTML={prefix.includes('<') ? { __html: prefix } : undefined}>
|
||||
{!prefix.includes('<') ? prefix : undefined}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
<ul className="list-disc pl-6 my-4 space-y-2">
|
||||
{parts.map((item: string, i: number) => {
|
||||
@@ -64,7 +64,7 @@ const jsxConverters: JSXConverters = {
|
||||
return <li key={i}>{cleanItem}</li>;
|
||||
})}
|
||||
</ul>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -118,10 +118,12 @@ const jsxConverters: JSXConverters = {
|
||||
);
|
||||
}
|
||||
|
||||
if (node.format === 1) return <strong>{text}</strong>;
|
||||
if (node.format === 2) return <em>{text}</em>;
|
||||
return <span>{text}</span>;
|
||||
if (node.format === 1) return <strong key="bold">{text}</strong>;
|
||||
if (node.format === 2) return <em key="italic">{text}</em>;
|
||||
return <span key="text">{text}</span>;
|
||||
},
|
||||
// Use div instead of p for paragraphs to allow nested block elements (like the lists above)
|
||||
paragraph: ({ children }: any) => <div className="mb-4 leading-relaxed">{children}</div>,
|
||||
// Scale headings to prevent multiple H1s (H1 -> H2, etc)
|
||||
h1: ({ children }: any) => <h2 className="text-3xl md:text-4xl font-bold my-6">{children}</h2>,
|
||||
h2: ({ children }: any) => <h3 className="text-2xl md:text-3xl font-bold my-5">{children}</h3>,
|
||||
@@ -170,10 +172,10 @@ const jsxConverters: JSXConverters = {
|
||||
/>
|
||||
),
|
||||
technicalGrid: ({ node }: any) => (
|
||||
<TechnicalGrid title={node.fields.title} items={node.fields.items} />
|
||||
<TechnicalGrid title={node?.fields?.title} items={node?.fields?.items} />
|
||||
),
|
||||
'block-technicalGrid': ({ node }: any) => {
|
||||
console.log('[PayloadRichText] Rendering block-technicalGrid:', node.fields.title);
|
||||
if (!node?.fields) return null;
|
||||
return <TechnicalGrid title={node.fields.title} items={node.fields.items} />;
|
||||
},
|
||||
highlightBox: ({ node }: any) => (
|
||||
@@ -246,20 +248,23 @@ const jsxConverters: JSXConverters = {
|
||||
{node.fields.title}
|
||||
</SplitHeading>
|
||||
),
|
||||
productTabs: ({ node }: any) => (
|
||||
<ProductTabs
|
||||
technicalData={
|
||||
<ProductTechnicalData
|
||||
data={{
|
||||
technicalItems: node.fields.technicalItems,
|
||||
voltageTables: node.fields.voltageTables,
|
||||
}}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<></>
|
||||
</ProductTabs>
|
||||
),
|
||||
productTabs: ({ node }: any) => {
|
||||
if (!node?.fields) return null;
|
||||
return (
|
||||
<ProductTabs
|
||||
technicalData={
|
||||
<ProductTechnicalData
|
||||
data={{
|
||||
technicalItems: node.fields.technicalItems,
|
||||
voltageTables: node.fields.voltageTables,
|
||||
}}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<></>
|
||||
</ProductTabs>
|
||||
);
|
||||
},
|
||||
'block-productTabs': ({ node }: any) => (
|
||||
<ProductTabs
|
||||
technicalData={
|
||||
|
||||
Reference in New Issue
Block a user