Unverified Commit 105140b3 authored by yannickjacqueline's avatar yannickjacqueline Committed by GitHub
Browse files

feat(epds): agrandissement bouton Être contacté + trackers (#688)

parent a2ef2f0a
......@@ -171,6 +171,7 @@ const TabAroundMeScreen: React.FC = () => {
};
const onMarkerClick = (poiIndex: number) => {
trackScreenView(TrackerUtils.TrackingEvent.CARTO_CLICK_POI);
if (PLATFORM_IS_IOS) {
moveMapToCoordinates(
poisArray[poiIndex].position_latitude,
......
......@@ -2,6 +2,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { ApolloClient, InMemoryCache } from "@apollo/client";
import { useMutation } from "@apollo/client/react/hooks";
import { useMatomo } from "matomo-tracker-react-native";
import * as React from "react";
import { useEffect, useState } from "react";
import { ScrollView, StyleSheet } from "react-native";
......@@ -25,7 +26,12 @@ import {
StorageKeysConstants,
} from "../../constants";
import type { EpdsQuestionAndAnswers } from "../../type";
import { EpdsSurveyUtils, NotificationUtils, StorageUtils } from "../../utils";
import {
EpdsSurveyUtils,
NotificationUtils,
StorageUtils,
TrackerUtils,
} from "../../utils";
import BeContacted from "./beContacted.component";
import EpdsResultInformation from "./epdsResultInformation/epdsResultInformation.component";
......@@ -54,6 +60,7 @@ const EpdsLightResult: React.FC<Props> = ({
console.log(err);
},
});
const { trackScreenView } = useMatomo();
const [showBeContactedModal, setShowBeContactedModal] = useState(false);
const [showSnackBar, setShowSnackBar] = useState(false);
......@@ -139,6 +146,7 @@ const EpdsLightResult: React.FC<Props> = ({
rounded={true}
disabled={false}
action={() => {
trackScreenView(TrackerUtils.TrackingEvent.EPDS_BE_CONTACTED);
setShowBeContactedModal(true);
}}
/>
......@@ -187,7 +195,7 @@ const styles = StyleSheet.create({
fontWeight: FontWeight.bold,
},
fontButton: {
fontSize: Sizes.xs,
fontSize: Sizes.md,
textTransform: "uppercase",
},
itemBorder: {
......
......@@ -19,7 +19,9 @@ export enum TrackingEvent {
EVENT = "Événement",
EVENT_SEE_THE_MAP = "Événement - Voir la carte",
CARTO = "Cartographie",
CARTO_CLICK_POI = "Cartographie - Clic sur un POI",
EPDS = "EPDS",
EPDS_BE_CONTACTED = "EPDS - Être contacté",
NOTIFICATION = "Notification",
FILTER_CARTO = "Filtre (Carto)",
FILTER_ARTICLES = "Filtre (Articles)",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment