diff --git a/expo/src/components/InAppModal.js b/expo/src/components/InAppModal.js index 6df5e4f59..22cd8f276 100644 --- a/expo/src/components/InAppModal.js +++ b/expo/src/components/InAppModal.js @@ -21,6 +21,7 @@ import CravingIcon from "./illustrations/CravingIcon"; import StrategyIcon from "./illustrations/StrategyIcon"; import CupMotivation from "./illustrations/icons/CupMotivation"; import TransferModalIcon from "./illustrations/icons/TransferModalIcon"; +import { APPSTORE_URL, PLAYSTORE_URL } from "../reference/urls"; /* example { @@ -56,8 +57,8 @@ const InAppModal = ({ navigation, route }) => { } else { Linking.openURL( Platform.select({ - ios: "https://apps.apple.com/us/app/oz-ensemble/id1498190343?ls=1", - android: "https://play.google.com/store/apps/details?id=com.addicto", + ios: APPSTORE_URL, + android: PLAYSTORE_URL, }) ); } @@ -90,8 +91,8 @@ const InAppModal = ({ navigation, route }) => { } else { Linking.openURL( Platform.select({ - ios: "https://apps.apple.com/us/app/oz-ensemble/id1498190343?ls=1", - android: "https://play.google.com/store/apps/details?id=com.addicto", + ios: APPSTORE_URL, + android: PLAYSTORE_URL, }) ); } diff --git a/expo/src/reference/urls.js b/expo/src/reference/urls.js new file mode 100644 index 000000000..e9f28bcf1 --- /dev/null +++ b/expo/src/reference/urls.js @@ -0,0 +1,9 @@ +export const PLAYSTORE_URL = "https://play.google.com/store/apps/details?id=com.addicto"; +export const APPSTORE_URL = "https://apps.apple.com/us/app/oz-ensemble/id1498190343?ls=1"; +export const OZ_LANDING_PAGE = "https://ozensemble.fabrique.social.gouv.fr/"; +export const PRIVACY_POLICY_URL = "https://ozensemble.fabrique.social.gouv.fr/files/privacy_policy_app.html"; +export const CGUS_URL = "https://ozensemble.fabrique.social.gouv.fr/files/CGU_app.html"; +export const GERALDINE_URL = "https://www.linkedin.com/in/geraldine-talbot-13989b263"; +export const DOCTOLIB_URL = + "https://www.doctolib.fr/addictologue/montreuil/ensemble-oz?utm_campaign=website-button&utm_source=ensemble-oz-website-button&utm_medium=referral&utm_content=option-1&utm_term=ensemble-oz"; +export const CAPASSCITE = "https://www.capasscite.fr/"; diff --git a/expo/src/scenes/Badges/BadgeModal.js b/expo/src/scenes/Badges/BadgeModal.js index ea76e1acb..228cef395 100644 --- a/expo/src/scenes/Badges/BadgeModal.js +++ b/expo/src/scenes/Badges/BadgeModal.js @@ -1,13 +1,6 @@ import * as Linking from "expo-linking"; import React, { useEffect } from "react"; -import { - InteractionManager, - Platform, - SafeAreaView, - Text, - TouchableOpacity, - View, -} from "react-native"; +import { InteractionManager, Platform, SafeAreaView, Text, TouchableOpacity, View } from "react-native"; import InAppReview from "react-native-in-app-review"; import Svg, { Path } from "react-native-svg"; import { useSetRecoilState } from "recoil"; @@ -25,6 +18,7 @@ import { BadgeDrinks } from "./Svgs/BadgeDrinks"; import { BadgeGoals } from "./Svgs/BadgeGoals"; import { BadgeShare } from "./Svgs/BadgeShare"; import { LockedBadge } from "./Svgs/LockedBadge"; +import { APPSTORE_URL, PLAYSTORE_URL } from "../../reference/urls"; /* example { category: 'drinks', @@ -70,8 +64,8 @@ const BadgeModal = ({ navigation, route }) => { } else { Linking.openURL( Platform.select({ - ios: "https://apps.apple.com/us/app/oz-ensemble/id1498190343?ls=1", - android: "https://play.google.com/store/apps/details?id=com.addicto", + ios: APPSTORE_URL, + android: PLAYSTORE_URL, }) ); } @@ -97,8 +91,8 @@ const BadgeModal = ({ navigation, route }) => { } else { Linking.openURL( Platform.select({ - ios: "https://apps.apple.com/us/app/oz-ensemble/id1498190343?ls=1", - android: "https://play.google.com/store/apps/details?id=com.addicto", + ios: APPSTORE_URL, + android: PLAYSTORE_URL, }) ); } @@ -154,9 +148,7 @@ const BadgeModal = ({ navigation, route }) => { )} {!!badge?.secondaryButtonTitle?.length && ( - + {badge?.secondaryButtonTitle} diff --git a/expo/src/scenes/Health/ContactForm.js b/expo/src/scenes/Health/ContactForm.js index 2e2a64b73..ea7b49d87 100644 --- a/expo/src/scenes/Health/ContactForm.js +++ b/expo/src/scenes/Health/ContactForm.js @@ -7,6 +7,7 @@ import { logEvent } from "../../services/logEventsWithMatomo"; import { defaultPaddingFontScale, screenWidth } from "../../styles/theme"; import H2 from "../../components/H2"; import WrapperContainer from "../../components/WrapperContainer"; +import { CAPASSCITE } from "../../reference/urls"; const ContactForm = ({ navigation }) => { return ( @@ -16,11 +17,10 @@ const ContactForm = ({ navigation }) => { <> Échangez gratuitement - - par téléphone avec un professionnel de l'addiction - + par téléphone avec un professionnel de l'addiction - }> + } + > Prenez un rendez-vous téléphonique @@ -44,8 +44,8 @@ const ContactForm = ({ navigation }) => { - Nos équipes sont des professionnels spécialisés en addictions et vous aideront à faire le - point ou répondront à vos questions. Nos locaux sont situés à Montreuil -{" "} + Nos équipes sont des professionnels spécialisés en addictions et vous aideront à faire le point ou répondront + à vos questions. Nos locaux sont situés à Montreuil -{" "} { category: "CONTACT", action: "CONTACT_WEBSITE_OPEN", }); - Linking.openURL("https://www.capasscite.fr/"); - }}> + Linking.openURL(CAPASSCITE); + }} + > Qui sommes nous ? diff --git a/expo/src/scenes/Health/Doctolib.js b/expo/src/scenes/Health/Doctolib.js index d152a8d6a..b0e792370 100644 --- a/expo/src/scenes/Health/Doctolib.js +++ b/expo/src/scenes/Health/Doctolib.js @@ -7,6 +7,7 @@ import Background from "../../components/Background"; import BackButton from "../../components/BackButton"; import { logEvent } from "../../services/logEventsWithMatomo"; import { defaultPaddingFontScale } from "../../styles/theme"; +import { DOCTOLIB_URL } from "../../reference/urls"; const Doctolib = ({ navigation }) => { const [visible, setVisible] = useState(true); @@ -56,11 +57,7 @@ const Doctolib = ({ navigation }) => { }; return ( - + @@ -70,7 +67,7 @@ const Doctolib = ({ navigation }) => { ( - + diff --git a/expo/src/scenes/Infos/Official.js b/expo/src/scenes/Infos/Official.js index c487e66e4..b2020e5ca 100644 --- a/expo/src/scenes/Infos/Official.js +++ b/expo/src/scenes/Infos/Official.js @@ -6,25 +6,22 @@ import WrapperContainer from "../../components/WrapperContainer"; import TextStyled from "../../components/TextStyled"; import H1 from "../../components/H1"; import Background from "../../components/Background"; +import { GERALDINE_URL } from "../../reference/urls"; const Official = ({ onClose }) => ( - +

Oz Ensemble, l’application des Ministères Sociaux

- Oz est un service publique numérique anonyme et gratuit développé par la Fabrique Numérique, - incubateur des Ministères Sociaux et financé par l’Agence Régionale de Santé d’Ile de France - et de la MILDECA (Mission Interministérielle de Lutte Contre les Drogues et les Conduites - Addictives) + Oz est un service publique numérique anonyme et gratuit développé par la Fabrique Numérique, incubateur des + Ministères Sociaux et financé par l’Agence Régionale de Santé d’Ile de France et de la MILDECA (Mission + Interministérielle de Lutte Contre les Drogues et les Conduites Addictives)

@@ -32,8 +29,9 @@ const Official = ({ onClose }) => ( { - Linking.openURL("https://www.linkedin.com/in/geraldine-talbot-13989b263"); - }}> + Linking.openURL(GERALDINE_URL); + }} + > Docteur Géraldine Talbot , médecin addictologue de l’association CaPASSCité. @@ -42,28 +40,12 @@ const Official = ({ onClose }) => ( {/* */} - - + + - - + + diff --git a/expo/src/scenes/Infos/PrivacyPolicy.js b/expo/src/scenes/Infos/PrivacyPolicy.js index 2ce6e0a5c..335b26687 100644 --- a/expo/src/scenes/Infos/PrivacyPolicy.js +++ b/expo/src/scenes/Infos/PrivacyPolicy.js @@ -4,20 +4,17 @@ import BackButton from "../../components/BackButton"; import { defaultPaddingFontScale } from "../../styles/theme"; import { WebView } from "react-native-webview"; import styled from "styled-components"; - -const htmlUrl = "https://ozensemble.fabrique.social.gouv.fr/files/privacy_policy_app.html"; +import { PRIVACY_POLICY_URL } from "../../reference/urls"; const PrivacyPolicy = ({ onClose }) => ( - + diff --git a/expo/src/services/shareApp.js b/expo/src/services/shareApp.js index 5d59846a7..ea453accc 100644 --- a/expo/src/services/shareApp.js +++ b/expo/src/services/shareApp.js @@ -1,52 +1,53 @@ -import { Share, Platform } from 'react-native'; -import { logEvent } from './logEventsWithMatomo'; -import { capture } from './sentry'; -import API from './api'; -import { storage } from './storage'; +import { Share, Platform } from "react-native"; +import { logEvent } from "./logEventsWithMatomo"; +import { capture } from "./sentry"; +import API from "./api"; +import { storage } from "./storage"; +import { OZ_LANDING_PAGE } from "../reference/urls"; export const shareApp = async () => { - const url = 'https://ozensemble.fabrique.social.gouv.fr/'; + const url = OZ_LANDING_PAGE; try { logEvent({ - category: 'SHARE_APP', - action: 'PRESSED', + category: "SHARE_APP", + action: "PRESSED", }); const result = await Share.share({ message: "Bonjour, je te recommande l'application gratuite et totalement anonyme Oz Ensemble qui aide à maitriser sa consommation d'alcool. Bonne découverte !" + - (Platform.OS === 'android' ? '\n' + url : ''), - url: Platform.OS === 'ios' && url, + (Platform.OS === "android" ? "\n" + url : ""), + url: Platform.OS === "ios" && url, }); if (result?.action === Share.sharedAction) { API.post({ - path: '/badge/shares', + path: "/badge/shares", body: { - matomoId: storage.getString('@UserIdv2'), + matomoId: storage.getString("@UserIdv2"), }, }); if (result?.activityType) { logEvent({ - category: 'SHARE_APP', - action: 'SHARED', + category: "SHARE_APP", + action: "SHARED", name: result?.activityType, }); } else { logEvent({ - category: 'SHARE_APP', - action: 'SHARED', + category: "SHARE_APP", + action: "SHARED", }); } } else if (result.action === Share.dismissedAction) { logEvent({ - category: 'SHARE_APP', - action: 'DISMISSED', + category: "SHARE_APP", + action: "DISMISSED", }); } } catch (error) { - capture('share app failure ' + error); + capture("share app failure " + error); logEvent({ - category: 'SHARE_APP', - action: 'ERROR', + category: "SHARE_APP", + action: "ERROR", }); } };