react-native-timacare 3.1.42 → 3.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.flow +0 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +3 -3
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +0 -81
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/splash/index.js +1 -1
- package/lib/commonjs/screens/splash/index.js.flow +29 -68
- package/lib/commonjs/screens/splash/index.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +1 -0
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/primary-navigator.js +1 -1
- package/lib/module/navigation/primary-navigator.js.map +1 -1
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/index.js.map +1 -1
- package/lib/module/screens/splash/index.js +1 -1
- package/lib/module/screens/splash/index.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/screens/splash/index.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +0 -1
- package/src/navigation/primary-navigator.tsx +3 -3
- package/src/screens/home/index.tsx +0 -81
- package/src/screens/splash/index.tsx +29 -68
- package/src/screens/toan-trinh-so/OCR.tsx +1 -0
|
@@ -18,6 +18,7 @@ import { color } from '../../theme';
|
|
|
18
18
|
import { MText } from '../../components/MText';
|
|
19
19
|
import { load } from '../../utils/storage';
|
|
20
20
|
import { Api } from '../../services/api';
|
|
21
|
+
import MHeader from '../../components/MHeader';
|
|
21
22
|
|
|
22
23
|
const logoView: ImageStyle = {
|
|
23
24
|
position: 'absolute',
|
|
@@ -31,81 +32,41 @@ export const Splash = observer(function Splash() {
|
|
|
31
32
|
const [downloading, setDownloading] = useState(false);
|
|
32
33
|
|
|
33
34
|
const goLogin = async () => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
setDownloading(true);
|
|
36
|
+
const token = await load('TOKEN_TIMACARE');
|
|
37
|
+
if (token) {
|
|
38
|
+
Api.getInstance().changeAuth(token);
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
setDownloading(false);
|
|
41
|
+
navigation.dispatch(
|
|
42
|
+
CommonActions.reset({
|
|
43
|
+
index: 1,
|
|
44
|
+
routes: [{ name: ScreenNames.Main }],
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
}, 300);
|
|
48
|
+
} else {
|
|
49
|
+
navigation.push(ScreenNames.Register);
|
|
50
|
+
}
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
useEffect(() => {
|
|
52
|
-
|
|
53
|
-
goLogin();
|
|
54
|
-
}, 3000);
|
|
54
|
+
goLogin();
|
|
55
55
|
}, []);
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
58
|
<View style={[commonStyles.fill, { backgroundColor: 'white' }]}>
|
|
59
|
-
<
|
|
60
|
-
<View
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
<ActivityIndicator size={'large'} color={color.primary} />
|
|
73
|
-
<MText
|
|
74
|
-
style={{
|
|
75
|
-
marginTop: 8,
|
|
76
|
-
color: color.primary,
|
|
77
|
-
fontSize: 16,
|
|
78
|
-
fontWeight: 'bold',
|
|
79
|
-
textAlign: 'center',
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
Đang cập nhật{'\n'}
|
|
83
|
-
Vui lòng không tắt ứng dụng
|
|
84
|
-
</MText>
|
|
85
|
-
</View>
|
|
86
|
-
) : (
|
|
87
|
-
<View />
|
|
88
|
-
)}
|
|
89
|
-
</SafeAreaView>
|
|
90
|
-
<Animatable.View
|
|
91
|
-
animation={'fadeInUp'}
|
|
92
|
-
duration={1500}
|
|
93
|
-
style={{ flex: 1 }}
|
|
94
|
-
>
|
|
95
|
-
<View
|
|
96
|
-
style={{
|
|
97
|
-
position: 'absolute',
|
|
98
|
-
bottom: 0,
|
|
99
|
-
left: 0,
|
|
100
|
-
right: 0,
|
|
101
|
-
}}
|
|
102
|
-
>
|
|
103
|
-
<Animatable.View animation={'fadeInUp'} duration={2000}>
|
|
104
|
-
<Image source={require('./Star.png')} style={{ width: '100%' }} />
|
|
105
|
-
</Animatable.View>
|
|
106
|
-
<Image source={require('./Bottom.png')} style={{ width: '100%' }} />
|
|
107
|
-
</View>
|
|
108
|
-
</Animatable.View>
|
|
59
|
+
<MHeader title="Vay nhanh 24/7" />
|
|
60
|
+
<View
|
|
61
|
+
style={[
|
|
62
|
+
commonStyles.fill,
|
|
63
|
+
{
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
justifyContent: 'center',
|
|
66
|
+
},
|
|
67
|
+
]}
|
|
68
|
+
>
|
|
69
|
+
{downloading && <ActivityIndicator color={color.primary} />}
|
|
109
70
|
</View>
|
|
110
71
|
</View>
|
|
111
72
|
);
|