import React from 'react'; import { GatsbyImage } from 'gatsby-plugin-image'; import { Animation } from '../../components/Animation'; import { useCalendlyWidget } from '../../hooks/useCalendlyWidget'; import { Section } from '../../components/Section'; import { SocialProfiles } from '../../components/SocialProfiles'; import { useLocalDataSource } from './data'; import { PageSection } from '../../types'; import * as classes from './style.module.css'; export function HeroSection(props: PageSection): React.ReactElement { const response = useLocalDataSource(); const data = response.allHeroJson.sections[0]; const CalendlyWidget = useCalendlyWidget(data.calendly); return ( {CalendlyWidget}
{data.heroPhoto?.src && (
)}
{data.intro && {data.intro}} {data.image?.src && ( )}

{data.title}

{data.subtitle.prefix} {data.subtitle.highlight} {data.subtitle.suffix}

{data.description}

{data.socialProfiles && ( )}
); }