Added DeleteEmail button
Fixed email contianer to not be affected by polling added banner when no internet connections
This commit is contained in:
9
App.tsx
9
App.tsx
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { NavigationContainer } from '@react-navigation/native';
|
||||
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
||||
import { Provider } from 'react-redux';
|
||||
@@ -12,6 +12,8 @@ import { withAuthenticator } from '@aws-amplify/ui-react-native';
|
||||
import { Amplify } from 'aws-amplify';
|
||||
import config from './src/aws-exports';
|
||||
import { enableScreens } from 'react-native-screens';
|
||||
import { useKeepAwake, deactivateKeepAwake } from 'expo-keep-awake';
|
||||
import { View } from 'react-native';
|
||||
|
||||
enableScreens();
|
||||
|
||||
@@ -26,6 +28,11 @@ const App: React.FC = () => {
|
||||
setScannedData('');
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
deactivateKeepAwake(); // Allow the screen to timeout
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<QRCodeContext.Provider value={{ scannedData, setScannedData }}>
|
||||
|
||||
Reference in New Issue
Block a user