--- // Import the necessary dependencies import { Image } from 'astro:assets'; import PrimaryCTA from '@components/ui/buttons/PrimaryCTA.astro'; import SecondaryCTA from '@components/ui/buttons/SecondaryCTA.astro'; import ReviewComponent from '@components/ui/blocks/ReviewComponent.astro'; // Define props from Astro const { title, subTitle, supportingLine, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL, withReview, avatars, rating, reviews, src, alt, } = Astro.props; // Define TypeScript interface for props interface Props { title: string; subTitle?: string; supportingLine?: string; primaryBtn?: string; primaryBtnURL?: string; secondaryBtn?: string; secondaryBtnURL?: string; withReview?: boolean; avatars?: Array; rating?: string; reviews?: string; src?: any; alt?: string; } --- {/* Defining a grid container that holds all the content */}
{/* Title and description */}
{ /* Each h1 and p tag renders a portion of the title and subTitle defined above */ }

{ /* About Fragment: https://docs.astro.build/en/basics/astro-syntax/#fragments */ }

{ subTitle && (

{subTitle}

) } { supportingLine && (

{supportingLine}

) } { /* Action Button Section: This section includes two CTAs with their own styles and URL */ }
{primaryBtn && } { secondaryBtn && ( ) }
{ /* Review Section: This section presents avatars, review ratings and the number of reviews */ } { withReview ? ( ) : ( '' ) }
{/* Hero Image Section */}
{ src && alt && ( {alt} ) }