|
1 | 1 | import React, { useEffect } from 'react' |
2 | | -import { ActivityIndicator, View, Button, Text } from 'react-native' |
3 | | -import { Layout, Fonts } from '@/Theme' |
4 | | -import { useDispatch, useSelector } from 'react-redux' |
| 2 | +import { ActivityIndicator, View, Text } from 'react-native' |
| 3 | +import { Layout, Fonts, Gutters } from '@/Theme' |
| 4 | +import { useDispatch } from 'react-redux' |
5 | 5 | import InitStartup from '@/Store/Startup/Init' |
6 | | -import { CommonActions } from '@react-navigation/native' |
7 | 6 | import { useTranslation } from 'react-i18next' |
| 7 | +import { Brand } from '@/Components' |
8 | 8 |
|
9 | 9 | const IndexStartupContainer = ({ navigation }) => { |
10 | 10 | const { t } = useTranslation() |
11 | 11 |
|
12 | 12 | const dispatch = useDispatch() |
13 | | - const isApplicationLoading = useSelector((state) => state.startup.loading) |
14 | 13 |
|
15 | 14 | useEffect(() => { |
16 | 15 | dispatch(InitStartup.action()) |
17 | 16 | }, [dispatch]) |
18 | 17 |
|
19 | 18 | return ( |
20 | | - <View style={[Layout.fill, Layout.rowCenter]}> |
21 | | - {isApplicationLoading ? ( |
22 | | - <ActivityIndicator /> |
23 | | - ) : ( |
24 | | - <View> |
25 | | - <Text style={Fonts.textCenter}>{t('welcome')}</Text> |
26 | | - <Button |
27 | | - title={t('actions.continue')} |
28 | | - onPress={() => |
29 | | - navigation.dispatch( |
30 | | - CommonActions.reset({ |
31 | | - index: 0, |
32 | | - routes: [{ name: 'Main' }], |
33 | | - }), |
34 | | - ) |
35 | | - } |
36 | | - /> |
37 | | - </View> |
38 | | - )} |
| 19 | + <View style={[Layout.fill, Layout.colCenter]}> |
| 20 | + <Brand /> |
| 21 | + <ActivityIndicator size={'large'} style={[Gutters.largeVMargin]} /> |
| 22 | + <Text style={Fonts.textCenter}>{t('welcome')}</Text> |
39 | 23 | </View> |
40 | 24 | ) |
41 | 25 | } |
|
0 commit comments