import AboutPage from '@/pages-templates/about';

import { mainPageApi } from '@/features/pages/api/pages.api';

import { makeStore } from '@/shared/store';

export default async function About() {
  const store = makeStore();

  const { data, isLoading } = await store.dispatch(
    mainPageApi.endpoints.fetchAboutUsPageContent.initiate(),
  );

  if (isLoading || !data) return null;

  return <AboutPage content={data} />;
}
