Added DeleteEmail button

Fixed email contianer to not be affected by polling

added banner when no internet connections
This commit is contained in:
2024-08-14 11:35:43 +08:00
parent 785e84c4f2
commit 187fd768e6
5 changed files with 307 additions and 46 deletions

View File

@@ -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 }}>