diff --git a/react-native/screens/TranslateScreen.tsx b/react-native/screens/TranslateScreen.tsx
index f99bc43..9c8c9ba 100644
--- a/react-native/screens/TranslateScreen.tsx
+++ b/react-native/screens/TranslateScreen.tsx
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { StyleSheet, View, TouchableOpacity, ImageBackground, Dimensions, Alert } from 'react-native';
-import { useToast, Box, Modal, Button, HStack, Text, Divider } from 'native-base';
+import { useToast, Box, Button, HStack, Text, Divider, Modal } from 'native-base';
import { Camera } from 'expo-camera';
import { Ionicons } from '@expo/vector-icons';
import { theme } from '../core/theme';
@@ -61,7 +61,7 @@ export default function TranslateScreen({ navigation }: Navigation) {
// ;
// }
// });
- if (results?.event_num) {
+ if (results?.event_num && results.event_num > 0) {
setOpenInitialEventForm(true);
}
else {
@@ -78,6 +78,12 @@ export default function TranslateScreen({ navigation }: Navigation) {
}
}, [results]);
+ useEffect(() => {
+ if (openInitialEventForm) {
+ setTimeout(() => {setOpenInitialEventForm(false)}, 5000);
+ }
+ }, [openInitialEventForm])
+
// DEV TEST
// if (hasPermission === null) {
// return ;
@@ -172,7 +178,7 @@ export default function TranslateScreen({ navigation }: Navigation) {
// date: "2022-03-24"
// }
// ]
- // })
+ // });
}
const handleKorean = (): void => {
@@ -294,7 +300,7 @@ export default function TranslateScreen({ navigation }: Navigation) {
extraMarginTop={10}
swipeHeight={Dimensions.get('window').height*0.65}
/>
-
+
{results?.event_num} Events Extracted