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.
Files changed (35) hide show
  1. package/lib/commonjs/index.js +1 -1
  2. package/lib/commonjs/index.js.flow +0 -1
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  5. package/lib/commonjs/navigation/primary-navigator.js.flow +3 -3
  6. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  7. package/lib/commonjs/screens/home/index.js +1 -1
  8. package/lib/commonjs/screens/home/index.js.flow +0 -81
  9. package/lib/commonjs/screens/home/index.js.map +1 -1
  10. package/lib/commonjs/screens/splash/index.js +1 -1
  11. package/lib/commonjs/screens/splash/index.js.flow +29 -68
  12. package/lib/commonjs/screens/splash/index.js.map +1 -1
  13. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  14. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +1 -0
  15. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  16. package/lib/module/index.js +1 -1
  17. package/lib/module/index.js.map +1 -1
  18. package/lib/module/navigation/primary-navigator.js +1 -1
  19. package/lib/module/navigation/primary-navigator.js.map +1 -1
  20. package/lib/module/screens/home/index.js +1 -1
  21. package/lib/module/screens/home/index.js.map +1 -1
  22. package/lib/module/screens/splash/index.js +1 -1
  23. package/lib/module/screens/splash/index.js.map +1 -1
  24. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  25. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  26. package/lib/typescript/index.d.ts.map +1 -1
  27. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  28. package/lib/typescript/screens/splash/index.d.ts.map +1 -1
  29. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  30. package/package.json +1 -1
  31. package/src/index.tsx +0 -1
  32. package/src/navigation/primary-navigator.tsx +3 -3
  33. package/src/screens/home/index.tsx +0 -81
  34. package/src/screens/splash/index.tsx +29 -68
  35. 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
- // const token = await load('TOKEN_TIMACARE');
35
- // if (token) {
36
- // Api.getInstance().changeAuth(token);
37
- // setTimeout(() => {
38
- // navigation.dispatch(
39
- // CommonActions.reset({
40
- // index: 1,
41
- // routes: [{ name: ScreenNames.Main }],
42
- // })
43
- // );
44
- // }, 300);
45
- // } else {
46
- // navigation.push(ScreenNames.Register);
47
- // }
48
- navigation.push(ScreenNames.Register);
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
- setTimeout(() => {
53
- goLogin();
54
- }, 3000);
54
+ goLogin();
55
55
  }, []);
56
56
 
57
57
  return (
58
58
  <View style={[commonStyles.fill, { backgroundColor: 'white' }]}>
59
- <Image source={require('./Onboarding.png')} style={logoView} />
60
- <View style={[commonStyles.fill]}>
61
- <SafeAreaView>
62
- <View style={{ marginTop: 30 }}>
63
- <LogoTima />
64
- </View>
65
- {downloading ? (
66
- <View
67
- style={{
68
- alignItems: 'center',
69
- marginTop: Dimensions.get('screen').height / 4,
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
  );
@@ -801,6 +801,7 @@ export const OCR = observer(function OCR(props: any) {
801
801
  </LinearGradient>
802
802
  </MButton> */}
803
803
  </View>
804
+ <View style={{ height: 24 }}></View>
804
805
  </View>
805
806
  </View>
806
807
  </LinearGradient>