Loading...
Last updated: May 31, 2026
'use client';
import React from 'react';
const PageComponent = ({ pageData, pageTitle }) => {
if (!pageData?.content) {
return (
<div className="max-w-4xl mx-auto px-5 py-20 text-center text-gray-400">
No content available.
</div>
);
}
const displayDate = pageData.updatedDate
? new Date(pageData.updatedDate).toLocaleDateString('en-US', {
year: 'numeric', month: 'long', day: '2-digit',
})
: null;
return (
<div className="max-w-4xl mx-auto px-4 sm:px-6 py-10">
{pageTitle && (
<h1 className="text-2xl font-bold text-gray-800 mb-2">{pageTitle}</h1>
)}
{displayDate && (
<p className="text-sm text-gray-400 mb-6">Last updated: {displayDate}</p>
)}
<div
className="description-content"
dangerouslySetInnerHTML={{ __html: pageData.content }}
/>
</div>
);
};
export default PageComponent;