diff --git a/front/app/components/ProjectDescriptionBuilder/ProjectDescriptionBuilderTopBar/index.tsx b/front/app/components/ProjectDescriptionBuilder/ProjectDescriptionBuilderTopBar/index.tsx index 12f113140be9..fd309bc68e13 100644 --- a/front/app/components/ProjectDescriptionBuilder/ProjectDescriptionBuilderTopBar/index.tsx +++ b/front/app/components/ProjectDescriptionBuilder/ProjectDescriptionBuilderTopBar/index.tsx @@ -66,12 +66,10 @@ const ProjectDescriptionBuilderTopBar = ({ }; const handleSave = async () => { - if (selectedLocale) { - addProjectDescriptionBuilderLayout({ - projectId, - craftjs_json: query.getSerializedNodes(), - }); - } + addProjectDescriptionBuilderLayout({ + projectId, + craftjs_json: query.getSerializedNodes(), + }); }; const handleSelectLocale = (locale: SupportedLocale) => { diff --git a/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/components/HomepageBuilderTopBar/index.tsx b/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/components/HomepageBuilderTopBar/index.tsx index 1b84db7b7d65..0f26fed7e5d2 100644 --- a/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/components/HomepageBuilderTopBar/index.tsx +++ b/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/components/HomepageBuilderTopBar/index.tsx @@ -52,11 +52,9 @@ const BuilderTopBar = ({ }; const handleSave = () => { - if (selectedLocale) { - updateHomepage({ - craftjs_json: query.getSerializedNodes(), - }); - } + updateHomepage({ + craftjs_json: query.getSerializedNodes(), + }); }; const handleSelectLocale = (locale: SupportedLocale) => { diff --git a/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/containers/index.tsx b/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/containers/index.tsx index f3619cce00e1..03cc66ef387d 100644 --- a/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/containers/index.tsx +++ b/front/app/containers/Admin/pagesAndMenu/containers/ContentBuilder/containers/index.tsx @@ -110,9 +110,7 @@ const HomepageBuilderPage = () => { mt={`${stylingConsts.menuHeight}px`} display={previewEnabled ? 'none' : 'flex'} > - {selectedLocale && ( - - )} + { locale: SupportedLocale; editorData: SerializedNodes; }) => { - if (selectedLocale && selectedLocale !== locale) { + if (selectedLocale !== locale) { setDraftData({ ...draftData, [selectedLocale]: editorData }); } @@ -138,9 +138,7 @@ const ProjectDescriptionBuilderPage = () => { mt={`${stylingConsts.menuHeight}px`} display={previewEnabled ? 'none' : 'flex'} > - {selectedLocale && ( - - )} +