diff --git a/CHANGELOG.md b/CHANGELOG.md index fa6d9de90..516fa907a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v0.43.0](https://github.com/isomerpages/isomercms-frontend/compare/v0.42.0...v0.43.0) + +- fix(herobody): solves empty highlight deafult issue [`#1489`](https://github.com/isomerpages/isomercms-frontend/pull/1489) +- fix(edithomepage): spread properly [`#1487`](https://github.com/isomerpages/isomercms-frontend/pull/1487) +- Release/0.42.0 (develop) [`#1481`](https://github.com/isomerpages/isomercms-frontend/pull/1481) + #### [v0.42.0](https://github.com/isomerpages/isomercms-frontend/compare/v0.41.0...v0.42.0) +> 7 September 2023 + - fix(editable): hover and focus states for title text [`#1484`](https://github.com/isomerpages/isomercms-frontend/pull/1484) - Fix/style nits [`#1483`](https://github.com/isomerpages/isomercms-frontend/pull/1483) - fix: styling [`#1482`](https://github.com/isomerpages/isomercms-frontend/pull/1482) @@ -64,12 +72,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - chore: downgrade webpack-dev-server [`#1418`](https://github.com/isomerpages/isomercms-frontend/pull/1418) - fix(e2e): reduce mem usage [`#1428`](https://github.com/isomerpages/isomercms-frontend/pull/1428) - Release/0.39.0 [`#1425`](https://github.com/isomerpages/isomercms-frontend/pull/1425) -- fix: conditional for checkCSP [`#1423`](https://github.com/isomerpages/isomercms-frontend/pull/1423) #### [v0.39.0](https://github.com/isomerpages/isomercms-frontend/compare/v0.38.0...v0.39.0) -> 16 August 2023 +> 17 August 2023 +- fix: conditional for checkCSP [`#1423`](https://github.com/isomerpages/isomercms-frontend/pull/1423) - feat(sl): integrate screens with be [`#1410`](https://github.com/isomerpages/isomercms-frontend/pull/1410) - Fix/is 422 update csp retrieval [`#1414`](https://github.com/isomerpages/isomercms-frontend/pull/1414) - Feat(site launch): add pending screen [`#1409`](https://github.com/isomerpages/isomercms-frontend/pull/1409) diff --git a/package-lock.json b/package-lock.json index 11bc8a560..ab5ed071e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "isomercms-frontend", - "version": "0.42.0", + "version": "0.43.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "isomercms-frontend", - "version": "0.42.0", + "version": "0.43.0", "hasInstallScript": true, "dependencies": { "@braintree/sanitize-url": "^6.0.1", diff --git a/package.json b/package.json index a98338542..805bc5fa7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "isomercms-frontend", - "version": "0.42.0", + "version": "0.43.0", "private": true, "engines": { "node": ">=16.0.0" diff --git a/src/layouts/EditHomepage/EditHomepage.jsx b/src/layouts/EditHomepage/EditHomepage.jsx index 2462c2070..cf7a361c0 100644 --- a/src/layouts/EditHomepage/EditHomepage.jsx +++ b/src/layouts/EditHomepage/EditHomepage.jsx @@ -960,12 +960,17 @@ const EditHomepage = ({ match }) => { handleHighlightDropdownToggle={ handleHighlightDropdownToggle } + initialSectionType={ + section.hero.dropdown + ? "dropdown" + : "highlights" + } > {({ currentSelectedOption }) => currentSelectedOption === "dropdown" ? ( { ...errors.sections[0].hero, }} highlights={section.hero.key_highlights} + {...section.hero} /> ) } diff --git a/src/layouts/components/Homepage/HeroBody.tsx b/src/layouts/components/Homepage/HeroBody.tsx index 038540a79..a63aadfc3 100644 --- a/src/layouts/components/Homepage/HeroBody.tsx +++ b/src/layouts/components/Homepage/HeroBody.tsx @@ -51,6 +51,7 @@ interface HeroBodyProps extends HeroBodyFormFields { children: (props: { currentSelectedOption: HeroSectionType }) => React.ReactNode + initialSectionType: HeroSectionType } export const HeroBody = ({ @@ -62,9 +63,10 @@ export const HeroBody = ({ handleHighlightDropdownToggle, notification, children, + initialSectionType, }: HeroBodyProps) => { const [heroSectionType, setHeroSectionType] = useState( - "highlights" + initialSectionType ) const { onChange } = useEditableContext() @@ -147,7 +149,7 @@ export const HeroBody = ({ }, }) }} - defaultValue="highlights" + defaultValue={initialSectionType} > { 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 = ({