-
Notifications
You must be signed in to change notification settings - Fork 3k
/
Copy pathReimbursementAccountLoadingIndicator.js
52 lines (47 loc) · 2.2 KB
/
ReimbursementAccountLoadingIndicator.js
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
import React from 'react';
import {Image, StyleSheet, View} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../styles/styles';
import CONST from '../CONST';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import Text from './Text';
import HeaderWithCloseButton from './HeaderWithCloseButton';
import Navigation from '../libs/Navigation/Navigation';
import ScreenWrapper from './ScreenWrapper';
import FullScreenLoadingIndicator from './FullscreenLoadingIndicator';
import FullPageOfflineBlockingView from './BlockingViews/FullPageOfflineBlockingView';
const propTypes = {
/** Whether the user is submitting verifications data */
isSubmittingVerificationsData: PropTypes.bool.isRequired,
...withLocalizePropTypes,
};
const ReimbursementAccountLoadingIndicator = props => (
<ScreenWrapper style={[StyleSheet.absoluteFillObject, styles.reimbursementAccountFullScreenLoading]}>
<HeaderWithCloseButton
title={props.translate('reimbursementAccountLoadingAnimation.oneMoment')}
onCloseButtonPress={Navigation.dismissModal}
/>
<FullPageOfflineBlockingView>
{props.isSubmittingVerificationsData ? (
<View style={[styles.pageWrapper]}>
<Image
source={{uri: `${CONST.CLOUDFRONT_URL}/images/icons/emptystates/emptystate_reviewing.gif`}}
style={[
styles.loadingVBAAnimation,
]}
/>
<View style={[styles.ph6]}>
<Text style={[styles.textAlignCenter]}>
{props.translate('reimbursementAccountLoadingAnimation.explanationLine')}
</Text>
</View>
</View>
) : (
<FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} />
)}
</FullPageOfflineBlockingView>
</ScreenWrapper>
);
ReimbursementAccountLoadingIndicator.propTypes = propTypes;
ReimbursementAccountLoadingIndicator.displayName = 'ReimbursementAccountLoadingIndicator';
export default withLocalize(ReimbursementAccountLoadingIndicator);