From b00c71c69e629d08113a52efb9e1e846eb9b2339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9=20Coniel?= Date: Mon, 26 Feb 2024 15:38:43 +0800 Subject: [PATCH] Develop (#38) * Fix: env variables in github * Fix: Env variables in release * Feat: Update page check (#37) --- .github/workflows/main.yml | 1 + App.tsx | 44 ++++++++++++++++++++++++++++--- android/app/build.gradle | 6 ----- package-lock.json | 8 +++--- package.json | 6 ++--- src/services/updateApp.service.ts | 18 +++++++++++++ 6 files changed, 66 insertions(+), 17 deletions(-) create mode 100644 src/services/updateApp.service.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4933552..2b04912 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -90,3 +90,4 @@ jobs: body: | Release version ${{steps.version.outputs.prop}} Fetures: + - Alert users that an update is available diff --git a/App.tsx b/App.tsx index 5fb7e22..2ab3cf9 100644 --- a/App.tsx +++ b/App.tsx @@ -1,13 +1,49 @@ -import React from 'react'; +import React, {useEffect, useState} from 'react'; import {NavigationContainer} from '@react-navigation/native'; import RootStackNavigation from './src/Navigation/RootStackNavigator'; +import updateApp from './src/services/updateApp.service'; +import {Button, Linking, StyleSheet, Text, View} from 'react-native'; const App = (): JSX.Element => { + const [version, setVersion] = useState(false); + useEffect(() => { + updateApp(setVersion); + }, []); return ( - - - + <> + {version ? ( + + + Il semblerait que votre application ne soit pas à jour ! + +