Skip to content

Commit

Permalink
fix: 🐛 Politique de confidentialité 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
benguedj committed Mar 18, 2024
1 parent de6e8d2 commit 5661675
Show file tree
Hide file tree
Showing 4 changed files with 242 additions and 409 deletions.
2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions front/src/components/html/a.component.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -15,10 +15,10 @@ interface AProps {
export type Props = AProps & TextProps;

const A: FC<Props> = (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 (
<SecondaryText
Expand Down
Loading

0 comments on commit 5661675

Please # to comment.