-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
68 lines (48 loc) · 1.64 KB
/
App.js
File metadata and controls
68 lines (48 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, View } from 'react-native';
import { useEffect, useState } from 'react';
import {loadLanguage, changeLanguage} from './src/screens/Settings/i18n';
import {useTranslation} from "react-i18next";
// Splash Screens
import Splash_1 from './src/screens/Splash_Screen/Splash_Screen_active/Splash_Screen_Page_1';
import Splash_2 from './src/screens/Splash_Screen/Splash_Screen_active/Splash_Screen_Page_2';
//Scanner
import Scanner from './src/components/Scanners/Scanner';
//Test
//import Generate_Code_2 from '../Qr_test/src/Generate_Code/Generate_Code_Wi-Fi';
import Menu from './src/navigate/Menu';
export default function App() {
const [showSecondPage, setShowSecondPage] = useState(false);
const [showScanner, setShowScanner] = useState(false);
//__________________________________________________________________________
//Translate
const {t} = useTranslation();
const handleLanguageChange = (lang) => {
console.log(lang)
changeLanguage(lang);
}
useEffect(() => {
loadLanguage();
}, []);
//__________________________________________________________________________
useEffect(() => {
const timer = setTimeout(() => {
setShowSecondPage(true);
}, 6000);
return () => clearTimeout(timer);
}, []);
return (
<View style={{ flex: 1 }}>
<StatusBar style="auto" />
{showScanner ? (
// <Generate_Code_2 />
//<Scanner />
<Menu/>
) : showSecondPage ? (
<Splash_2 onStart={() => setShowScanner(true)} />
) : (
<Splash_1 />
)}
</View>
);
}