-
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 #31257 from hungvu193/fix-30246
fix showing NotFound page when offline
- Loading branch information
Showing
5 changed files
with
114 additions
and
69 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 |
---|---|---|
@@ -0,0 +1,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; |
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
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
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
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