wip
This commit is contained in:
@@ -2,7 +2,6 @@ import { notFound } from 'next/navigation';
|
||||
import { getPageBySlug, getAllPages, getMediaById } from '@/lib/data';
|
||||
import { Metadata } from 'next';
|
||||
import { SEO } from '@/components/SEO';
|
||||
import { processHTML } from '@/lib/html-compat';
|
||||
import { ContentRenderer } from '@/components/content/ContentRenderer';
|
||||
import { Breadcrumbs } from '@/components/content/Breadcrumbs';
|
||||
import { Hero } from '@/components/content/Hero';
|
||||
@@ -61,12 +60,10 @@ export default async function ContactPage({ params }: PageProps) {
|
||||
// Get featured image if available
|
||||
const featuredImage = page.featuredImage ? getMediaById(page.featuredImage) : null;
|
||||
|
||||
// Process the content
|
||||
// Content is already processed during data export
|
||||
const contentToDisplay = page.contentHtml && page.contentHtml.trim() !== ''
|
||||
? page.contentHtml
|
||||
: page.excerptHtml;
|
||||
|
||||
const processedContent = processHTML(contentToDisplay || '');
|
||||
|
||||
// Breadcrumb items
|
||||
const breadcrumbItems = [
|
||||
@@ -91,7 +88,7 @@ export default async function ContactPage({ params }: PageProps) {
|
||||
{featuredImage && (
|
||||
<Hero
|
||||
title={page.title}
|
||||
subtitle={page.excerptHtml ? processHTML(page.excerptHtml).replace(/<[^>]*>/g, '') : undefined}
|
||||
subtitle={page.excerptHtml ? page.excerptHtml.replace(/<[^>]*>/g, '') : undefined}
|
||||
backgroundImage={featuredImage.localPath}
|
||||
backgroundAlt={page.title}
|
||||
height="md"
|
||||
@@ -110,7 +107,7 @@ export default async function ContactPage({ params }: PageProps) {
|
||||
</h1>
|
||||
{page.excerptHtml && (
|
||||
<ContentRenderer
|
||||
content={processHTML(page.excerptHtml)}
|
||||
content={page.excerptHtml}
|
||||
className="text-lg sm:text-xl text-gray-600 leading-relaxed"
|
||||
/>
|
||||
)}
|
||||
@@ -118,10 +115,10 @@ export default async function ContactPage({ params }: PageProps) {
|
||||
)}
|
||||
|
||||
{/* Content from WordPress */}
|
||||
{processedContent && (
|
||||
{contentToDisplay && (
|
||||
<ResponsiveWrapper className="bg-white rounded-lg shadow-sm p-6 sm:p-8 mb-12" container={true} maxWidth="full">
|
||||
<ContentRenderer
|
||||
content={processedContent}
|
||||
content={contentToDisplay}
|
||||
className="prose prose-lg max-w-none"
|
||||
/>
|
||||
</ResponsiveWrapper>
|
||||
|
||||
Reference in New Issue
Block a user