import { useRouter } from "next/router"
import Hero from "@/components/sections/hero"
import LargeVideo from "@/components/sections/large-video"
import FeatureColumnsGroup from "@/components/sections/feature-columns-group"
import FeatureRowsGroup from "@/components/sections/feature-rows-group"
import BottomActions from "@/components/sections/bottom-actions"
import TestimonialsGroup from "@/components/sections/testimonials-group"
import RichText from "./sections/rich-text"
import Pricing from "./sections/pricing"
import LeadForm from "./sections/lead-form"
// Map Strapi sections to section components
const sectionComponents = {
ComponentSectionsHero: Hero,
ComponentSectionsLargeVideo: LargeVideo,
ComponentSectionsFeatureColumnsGroup: FeatureColumnsGroup,
ComponentSectionsFeatureRowsGroup: FeatureRowsGroup,
ComponentSectionsBottomActions: BottomActions,
ComponentSectionsTestimonialsGroup: TestimonialsGroup,
ComponentSectionsRichText: RichText,
ComponentSectionsPricing: Pricing,
ComponentSectionsLeadForm: LeadForm,
}
// Display a section individually
const Section = ({ sectionData }) => {
// Prepare the component
const SectionComponent = sectionComponents[sectionData.__typename]
if (!SectionComponent) {
return null
}
// Display the section
return