Skip to content

Commit

Permalink
Merge pull request #7 from Moises088/feature/expo-update
Browse files Browse the repository at this point in the history
Feature/expo update
  • Loading branch information
Moises088 committed Nov 30, 2022
2 parents 53a644e + 015d422 commit ed3ce6c
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 2 deletions.
18 changes: 18 additions & 0 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { StatusBar } from 'expo-status-bar';
import AuthProvider from './src/contexts/authContext';
import BudgetsProvider from './src/contexts/budgetsContext';
import FinancesProvider from './src/contexts/financesContext';
import ThemeProvider from './src/contexts/themeContext';
import Routes from './src/routes/index.routes';
import * as Updates from 'expo-updates';

export default function App() {

React.useEffect(() => {
updateApp()
}, [])

const updateApp = async () => {
try {
const { isAvailable } = await Updates.checkForUpdateAsync();
if (isAvailable) {
await Updates.fetchUpdateAsync();
await Updates.reloadAsync();
}
} catch (err) {
}
}

return (
<AuthProvider>
<ThemeProvider>
Expand Down
105 changes: 105 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"ios": "expo start --ios",
"web": "expo start --web",
"test": "jest --watch --coverage=false",
"test:coverage": "jest --coverage"
"test:coverage": "jest --coverage",
"build:apk": "eas build -p android --profile preview"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.10",
Expand All @@ -32,7 +33,8 @@
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-svg": "12.3.0",
"react-native-web": "~0.18.7"
"react-native-web": "~0.18.7",
"expo-updates": "~0.14.7"
},
"devDependencies": {
"@babel/core": "^7.12.9",
Expand Down

0 comments on commit ed3ce6c

Please sign in to comment.