From db7274e3595a33b7a6e5c63326b9c36c9a07a040 Mon Sep 17 00:00:00 2001 From: Kgeek33 Date: Sun, 9 Feb 2025 22:28:38 +0100 Subject: [PATCH] =?UTF-8?q?feat(changelog):=20ajout=20d'un=20avertissement?= =?UTF-8?q?=20hors=20ligne=20et=20am=C3=A9lioration=20des=20messages=20d'e?= =?UTF-8?q?rreur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/welcome/ChangelogScreen.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/welcome/ChangelogScreen.tsx b/src/views/welcome/ChangelogScreen.tsx index 2181af7b4..4cc79d069 100644 --- a/src/views/welcome/ChangelogScreen.tsx +++ b/src/views/welcome/ChangelogScreen.tsx @@ -18,6 +18,7 @@ import { PressableScale } from "react-native-pressable-scale"; import AsyncStorage from "@react-native-async-storage/async-storage"; import {Screen} from "@/router/helpers/types"; +import { OfflineWarning, useOnlineStatus } from "@/hooks/useOnlineStatus"; interface Feature { title: string; @@ -44,6 +45,7 @@ const changelogURL = datasets.changelog.replace("[version]", currentVersion); const ChangelogScreen: Screen<"ChangelogScreen"> = ({ route, navigation }) => { const theme = useTheme(); const insets = useSafeAreaInsets(); + const { isOnline } = useOnlineStatus(); const [changelog, setChangelog] = useState(null); const [loading, setLoading] = useState(true); @@ -129,6 +131,8 @@ const ChangelogScreen: Screen<"ChangelogScreen"> = ({ route, navigation }) => { )} + {!isOnline && } + {notFound && ( = ({ route, navigation }) => { Impossible de trouver les notes de mise à jour - Tu es peut-être hors-ligne ou alors une erreur est survenue... + Les nouveautés de la version n'ont pas du être renseignées ou + alors une erreur est survenue...