-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathLoadingPage.js
36 lines (31 loc) · 1.11 KB
/
LoadingPage.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
import PropTypes from 'prop-types';
import React from 'react';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import useThemeStyles from '@hooks/useThemeStyles';
const propTypes = {
/** Method to trigger when pressing back button of the header */
onBackButtonPress: PropTypes.func,
title: PropTypes.string.isRequired,
};
const defaultProps = {
onBackButtonPress: undefined,
};
function LoadingPage(props) {
const styles = useThemeStyles();
return (
<ScreenWrapper testID={LoadingPage.displayName}>
<HeaderWithBackButton
onBackButtonPress={props.onBackButtonPress}
shouldShowBackButton
title={props.title}
/>
<FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} />
</ScreenWrapper>
);
}
LoadingPage.displayName = 'LoadingPage';
LoadingPage.propTypes = propTypes;
LoadingPage.defaultProps = defaultProps;
export default LoadingPage;