Skip to content

Commit

Permalink
Merge pull request #36681 from godofoutcasts94/migrate-pages-group-1
Browse files Browse the repository at this point in the history
  • Loading branch information
blimpich authored Feb 29, 2024
2 parents a1a6a74 + 0928071 commit bae502e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/pages/LoadingPage.js → src/pages/LoadingPage.tsx
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.

0 comments on commit bae502e

Please sign in to comment.