diff --git a/src/layouts/EditHomepage/EditHomepage.jsx b/src/layouts/EditHomepage/EditHomepage.jsx index 2462c2070..c78926733 100644 --- a/src/layouts/EditHomepage/EditHomepage.jsx +++ b/src/layouts/EditHomepage/EditHomepage.jsx @@ -964,8 +964,8 @@ const EditHomepage = ({ match }) => { {({ currentSelectedOption }) => currentSelectedOption === "dropdown" ? ( { ...errors.sections[0].hero, }} highlights={section.hero.key_highlights} + {...section.hero} /> ) } diff --git a/src/layouts/components/Homepage/HeroDropdownSection.tsx b/src/layouts/components/Homepage/HeroDropdownSection.tsx index f15d3ef1f..0a786af29 100644 --- a/src/layouts/components/Homepage/HeroDropdownSection.tsx +++ b/src/layouts/components/Homepage/HeroDropdownSection.tsx @@ -20,19 +20,18 @@ export interface HeroDropdownFormFields { url: string } -interface HeroDropdownSectionProps { +interface HeroDropdownSectionProps extends EditorHeroDropdownSection { errors: { dropdownElems: HeroDropdownFormFields[] title: string dropdown: string } - state: EditorHeroDropdownSection title: string } export const HeroDropdownSection = ({ errors, - state, + dropdown, title, }: HeroDropdownSectionProps) => { const { @@ -67,10 +66,10 @@ export const HeroDropdownSection = ({ - {state.dropdown.options.map( + {dropdown.options.map( ( { title: optionTitle, url: optionUrl }, dropdownOptionIndex @@ -145,7 +144,7 @@ export const HeroDropdownSection = ({