diff --git a/front/package.json b/front/package.json index fd66ba08a..b54a48b3f 100644 --- a/front/package.json +++ b/front/package.json @@ -88,7 +88,7 @@ "postinstall-postinstall": "^2.1.0", "react": "18.2.0", "react-dom": "18.2.0", - "react-native": "0.72.6", + "react-native": "0.72.10", "react-native-animatable": "^1.3.3", "react-native-calendars": "^1.1268.0", "react-native-confetti": "^0.1.0", diff --git a/front/src/components/html/a.component.tsx b/front/src/components/html/a.component.tsx index 812cf7335..c55f20f0a 100644 --- a/front/src/components/html/a.component.tsx +++ b/front/src/components/html/a.component.tsx @@ -1,7 +1,7 @@ import type { FC } from "react"; import * as React from "react"; import { useCallback } from "react"; -import { StyleSheet } from "react-native"; +import { Linking, StyleSheet } from "react-native"; import { Colors } from "../../styles"; import { LinkingUtils } from "../../utils"; @@ -15,10 +15,10 @@ interface AProps { export type Props = AProps & TextProps; const A: FC = (props) => { - const onTextPressed = useCallback( - async () => LinkingUtils.openWebsite(props.url), - [props.url] - ); + const onTextPressed = useCallback(() => { + if (props.url.startsWith("mailto:")) void Linking.openURL(props.url); + else void LinkingUtils.openWebsite(props.url); + }, [props.url]); return ( { + const iframeMatomo = ` +