Skip to content

Commit

Permalink
feat(recosante): add recosante widget on evaluation page (#1742)
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlesdoiron committed Mar 29, 2024
1 parent c1e552c commit dafc7be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions front/src/constants/Labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,12 @@ export default {
description: "",
title: "Dépression post partum, en parler c’est se soigner !",
},
recosante: {
buttonTitle: "Essayer Recosanté",
description: "",
title:
"Une application gratuite pour protéger votre santé et celle de votre famille",
},
title: "Auto-évaluations",
tnd: {
buttonTitle: "Commencer le repérage",
Expand Down
15 changes: 14 additions & 1 deletion front/src/screens/surveys/tabSurveysScreen.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ const TabSurveysScreen: FC = () => {
void RootNavigation.navigate("tndSurvey");
}, []);

const openRecosanteSurvey = useCallback(() => {
const RECOSANTE_WIDGET_SOURCE = "1000j-application";
void LinkingUtils.openWebsite(
`https://recosante.beta.gouv.fr/download?source=${RECOSANTE_WIDGET_SOURCE}`,
false
);
}, []);
const surveysBanner: SurveyBanner[] = [
{
buttonTitle: Labels.surveys.epds.buttonTitle,
Expand All @@ -55,6 +62,12 @@ const TabSurveysScreen: FC = () => {
onPress: openTndSurvey,
title: Labels.surveys.tnd.title,
},
{
buttonTitle: Labels.surveys.recosante.buttonTitle,
description: Labels.surveys.recosante.description,
onPress: openRecosanteSurvey,
title: Labels.surveys.recosante.title,
},
];

return (
Expand Down Expand Up @@ -124,7 +137,7 @@ const styles = StyleSheet.create({
backgroundColor: Colors.primaryBlueLight,
borderLeftColor: Colors.primaryBlueDark,
borderLeftWidth: 3,
marginBottom: Paddings.light,
marginBottom: Paddings.largest,
marginVertical: Paddings.default,
padding: Paddings.default,
},
Expand Down

0 comments on commit dafc7be

Please # to comment.