-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36681 from godofoutcasts94/migrate-pages-group-1
- Loading branch information
Showing
2 changed files
with
6 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,30 @@ | ||
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 = { | ||
type LoadingPageProps = { | ||
/** Method to trigger when pressing back button of the header */ | ||
onBackButtonPress: PropTypes.func, | ||
title: PropTypes.string.isRequired, | ||
}; | ||
onBackButtonPress?: () => void; | ||
|
||
const defaultProps = { | ||
onBackButtonPress: undefined, | ||
title: string; | ||
}; | ||
|
||
function LoadingPage(props) { | ||
function LoadingPage({onBackButtonPress, title}: LoadingPageProps) { | ||
const styles = useThemeStyles(); | ||
return ( | ||
<ScreenWrapper testID={LoadingPage.displayName}> | ||
<HeaderWithBackButton | ||
onBackButtonPress={props.onBackButtonPress} | ||
onBackButtonPress={onBackButtonPress} | ||
shouldShowBackButton | ||
title={props.title} | ||
title={title} | ||
/> | ||
<FullScreenLoadingIndicator style={[styles.flex1, styles.pRelative]} /> | ||
</ScreenWrapper> | ||
); | ||
} | ||
|
||
LoadingPage.displayName = 'LoadingPage'; | ||
LoadingPage.propTypes = propTypes; | ||
LoadingPage.defaultProps = defaultProps; | ||
|
||
export default LoadingPage; |
File renamed without changes.