Skip to content

Commit bb65884

Browse files
committed
front: change stdcm contact mail to deployment setting
Change the contact us email adress in the stdcm help section to the feedback mail defined in the deployment settings. This feedback mail was previously only used in the contact form under the simulations, but users would prefer the form from the help section to also use this email, as the current static one was not the most relevant. Signed-off-by: Alice K. <alice.khoudli@gmail.com>
1 parent 418f3c5 commit bb65884

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

front/public/locales/en/stdcm-help-section.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
},
5757
{
5858
"type": "text",
59-
"value": "<a href='mailto:supportclients.SI@sncf.fr' target=\"_blank\">Contact us</a>"
59+
"value": "<a href='mailto:{{stdcmFeedbackMail}}' target=\"_blank\">Contact us</a>"
6060
}
6161
],
6262
"title": "Improvements"

front/public/locales/fr/stdcm-help-section.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
},
6666
{
6767
"type": "text",
68-
"value": "<a href='mailto:supportclients.SI@sncf.fr' target=\"_blank\">Contactez-nous</a>"
68+
"value": "<a href='mailto:{{stdcmFeedbackMail}}' target=\"_blank\">Contactez-nous</a>"
6969
}
7070
],
7171
"title": "Améliorations"

front/src/applications/stdcm/components/StdcmHelpModule/HelpSection.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { ArrowLeft } from '@osrd-project/ui-icons';
22
import cx from 'classnames';
33
import { useTranslation } from 'react-i18next';
44

5+
import useDeploymentSettings from 'utils/hooks/useDeploymentSettings';
6+
57
import SectionContentManager from './SectionContentManager';
68
import type { Section } from './types';
79

@@ -13,7 +15,11 @@ type HelpSectionProps = {
1315

1416
const HelpSection = ({ section, isActive, closeHelpSection }: HelpSectionProps) => {
1517
const { t } = useTranslation('stdcm-help-section');
16-
const currentSection = t(`sections.${section}`, { returnObjects: true }) as Section;
18+
const stdcmFeedbackMail = useDeploymentSettings()?.stdcmFeedbackMail;
19+
const currentSection = t(`sections.${section}`, {
20+
returnObjects: true,
21+
stdcmFeedbackMail,
22+
}) as Section;
1723

1824
return (
1925
<div className={cx('stdcm__help-section', { active: isActive })}>

0 commit comments

Comments
 (0)