From 9996374bf7abd3f6d6f8ced66594b75256c77717 Mon Sep 17 00:00:00 2001 From: janrembold Date: Mon, 29 Apr 2024 16:04:55 +0200 Subject: [PATCH] feat: added text after save of new display name --- src/components/profile/ConsultantInformation.tsx | 14 ++++++++++++++ src/components/profile/profile.styles.scss | 4 ++++ src/resources/i18n/de/common.json | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/components/profile/ConsultantInformation.tsx b/src/components/profile/ConsultantInformation.tsx index 0a98e4f99..c7e69a3e0 100644 --- a/src/components/profile/ConsultantInformation.tsx +++ b/src/components/profile/ConsultantInformation.tsx @@ -30,6 +30,8 @@ export const ConsultantInformation = () => { const [isSaveDisabled, setIsSaveDisabled] = useState(false); const [editedDisplayName, setEditedDisplayName] = useState(''); const [initialDisplayName, setInitialDisplayName] = useState(''); + const [showNameChangePropagationInfo, setShowNameChangePropagationInfo] = + useState(false); const cancelEditButton: ButtonItem = { label: translate('profile.data.edit.button.cancel'), @@ -55,6 +57,7 @@ export const ConsultantInformation = () => { .then(() => { reloadUserData().catch(console.log); setInitialDisplayName(editedDisplayName); + setShowNameChangePropagationInfo(true); }) .catch((error) => { addNotification({ @@ -128,6 +131,17 @@ export const ConsultantInformation = () => { isDisabled={!isDisplayNameFeatureEnabled || !isEditEnabled} onValueIsValid={handleValidDisplayName} /> + {showNameChangePropagationInfo && ( +
+ +
+ )} {isDisplayNameFeatureEnabled && isEditEnabled && (