Skip to content

Commit

Permalink
Merge pull request #9226 from CitizenLabDotCo/fix-linter
Browse files Browse the repository at this point in the history
Fix linter
  • Loading branch information
luucvanderzee authored Oct 28, 2024
2 parents 7c62978 + 3cb7305 commit 2b347fa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ const BuilderTopBar = ({
};

const handleSave = () => {
if (selectedLocale) {
updateHomepage({
craftjs_json: query.getSerializedNodes(),
});
}
updateHomepage({
craftjs_json: query.getSerializedNodes(),
});
};

const handleSelectLocale = (locale: SupportedLocale) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ const HomepageBuilderPage = () => {
mt={`${stylingConsts.menuHeight}px`}
display={previewEnabled ? 'none' : 'flex'}
>
{selectedLocale && (
<HomepageBuilderToolbox selectedLocale={selectedLocale} />
)}
<HomepageBuilderToolbox selectedLocale={selectedLocale} />
<StyledRightColumn>
<LanguageProvider
contentBuilderLocale={selectedLocale}
Expand Down
6 changes: 2 additions & 4 deletions front/app/containers/ProjectDescriptionBuilder/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const ProjectDescriptionBuilderPage = () => {
locale: SupportedLocale;
editorData: SerializedNodes;
}) => {
if (selectedLocale && selectedLocale !== locale) {
if (selectedLocale !== locale) {
setDraftData({ ...draftData, [selectedLocale]: editorData });
}

Expand Down Expand Up @@ -138,9 +138,7 @@ const ProjectDescriptionBuilderPage = () => {
mt={`${stylingConsts.menuHeight}px`}
display={previewEnabled ? 'none' : 'flex'}
>
{selectedLocale && (
<ProjectDescriptionBuilderToolbox selectedLocale={selectedLocale} />
)}
<ProjectDescriptionBuilderToolbox selectedLocale={selectedLocale} />
<LanguageProvider
contentBuilderLocale={selectedLocale}
platformLocale={locale}
Expand Down

0 comments on commit 2b347fa

Please sign in to comment.