From 90926a278e533c13267f06fa00a227febfe5bc9b Mon Sep 17 00:00:00 2001 From: Vins Date: Thu, 20 Jun 2024 10:15:46 +0200 Subject: [PATCH] Fixed newsletter --- .../DesignSystem/Newsletter/index.tsx | 75 +++++++++---------- .../Folder/FolderInformation/index.tsx | 2 +- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/src/front/Components/DesignSystem/Newsletter/index.tsx b/src/front/Components/DesignSystem/Newsletter/index.tsx index bc26cd19..c81e6c78 100644 --- a/src/front/Components/DesignSystem/Newsletter/index.tsx +++ b/src/front/Components/DesignSystem/Newsletter/index.tsx @@ -26,7 +26,7 @@ export default class Newsletter extends React.Component { email: "", errorMessage: "", successMessage: "", - isNewsletterOpen: false, + isNewsletterOpen: this.props.isOpen ?? false, }; } @@ -60,46 +60,45 @@ export default class Newsletter extends React.Component { public override render(): JSX.Element { return ( <> - {this.state.isNewsletterOpen || - (this.props.isOpen && ( -
-
-
- - Restez Informé(e) avec notre Newsletter - - - Ne manquez aucune de nos actualités, promotions exclusives et conseils d'experts ! - - {this.state.errorMessage && ( -
- - {this.state.errorMessage} - -
- )} - {this.state.successMessage && ( -
- - {this.state.successMessage} - -
- )} -
+ {this.state.isNewsletterOpen && ( +
+
+
+ + Restez Informé(e) avec notre Newsletter + + + Ne manquez aucune de nos actualités, promotions exclusives et conseils d'experts ! + + {this.state.errorMessage && ( +
+ + {this.state.errorMessage} + +
+ )} + {this.state.successMessage && ( +
+ + {this.state.successMessage} + +
+ )} +
-
-
- -
- -
- -
+
+
+ +
+ +
+
- ))} +
+ )}
diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index 73714694..5a5f46d0 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -231,7 +231,7 @@ class FolderInformationClass extends BasePage { Cette action sera irréversible.
- +
) : (