fix: extract full description from productTabs block content instead of showing short fallback
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m42s
Build & Deploy / 🏗️ Build (push) Successful in 3m54s
Build & Deploy / 🚀 Deploy (push) Successful in 23s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 1m12s
Build & Deploy / ⚡ Performance & Accessibility (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-02-25 02:22:29 +01:00
parent fb62113a32
commit 2fabfc4445

View File

@@ -258,7 +258,7 @@ export default async function ProductPage({ params }: ProductPageProps) {
(node.fields?.blockType === 'productTabs' ||
node.fields?.blockType === 'productTechnicalData'),
);
const descriptionChildren = rootChildren.filter(
let descriptionChildren = rootChildren.filter(
(node: any) =>
!(
node.type === 'block' &&
@@ -267,6 +267,16 @@ export default async function ProductPage({ params }: ProductPageProps) {
),
);
// If no standalone description nodes, extract from the productTabs block's embedded content
if (descriptionChildren.length === 0) {
const tabsBlock = rootChildren.find(
(node: any) => node.type === 'block' && node.fields?.blockType === 'productTabs',
);
if (tabsBlock?.fields?.content?.root?.children) {
descriptionChildren = tabsBlock.fields.content.root.children;
}
}
const descriptionContent = {
root: {
...product.content.root,