import { fetchHeaderFooterHomeData } from "../../lib/serverFetch";
import { getAboutPageDataAction } from "../../lib/actions/aboutAction";
import { extractLanguage } from "../../lib/utils/domain";
import AboutPageClient from "../../components/about/AboutPageClient";
export const dynamic = "force-dynamic";

export default async function AboutPages() {
  const headerFooterHomeData = await fetchHeaderFooterHomeData();

  // Fetch about page content from API
  const aboutPageDataResponse = await getAboutPageDataAction();

  const aboutPageData = aboutPageDataResponse.success && aboutPageDataResponse.data
    ? aboutPageDataResponse.data
    : { default: null, translated: null };

  return (
    <AboutPageClient
      headerFooterHomeData={headerFooterHomeData}
      aboutPageData={aboutPageData}
    />
  );
}
