Skip to content

Commit

Permalink
added logging for open terms in mobility
Browse files Browse the repository at this point in the history
  • Loading branch information
Dahly96 committed Mar 4, 2025
1 parent 3da3ca9 commit 41760e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mobility/components/onboarding/RulesScreenComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {useAnalyticsContext} from '@atb/analytics';
import {
RuleAlcohol,
RuleHelmet,
Expand Down Expand Up @@ -30,12 +31,14 @@ export const RulesScreenComponent = ({
const {t, language} = useTranslation();
const {configurableLinks} = useFirestoreConfigurationContext();
const mobilityTerms = configurableLinks?.mobilityTermsUrl;
const analytics = useAnalyticsContext();

const mobilityTermsUrl = getTextForLanguage(mobilityTerms, language);

const onOpenTerms = () => {
if (mobilityTermsUrl) {
Linking.openURL(mobilityTermsUrl);
analytics.logEvent('Mobility', 'Open terms');
}
};

Expand Down

0 comments on commit 41760e7

Please sign in to comment.