Skip to content

Commit

Permalink
Merge pull request #37129 from VickyStash/ts-migration/reimbursementA…
Browse files Browse the repository at this point in the history
…ccountLoadingIndicator-component

[TS migration] Migrate 'ReimbursementAccountLoadingIndicator.js' component to TypeScript
  • Loading branch information
arosiclair authored Feb 28, 2024
2 parents f9eb683 + 2bc705a commit 1d17193
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PropTypes from 'prop-types';
import React from 'react';
import {StyleSheet, View} from 'react-native';
import useLocalize from '@hooks/useLocalize';
Expand All @@ -10,14 +9,15 @@ import LottieAnimations from './LottieAnimations';
import ScreenWrapper from './ScreenWrapper';
import Text from './Text';

const propTypes = {
type ReimbursementAccountLoadingIndicatorProps = {
/** Method to trigger when pressing back button of the header */
onBackButtonPress: PropTypes.func.isRequired,
onBackButtonPress: () => void;
};

function ReimbursementAccountLoadingIndicator(props) {
function ReimbursementAccountLoadingIndicator({onBackButtonPress}: ReimbursementAccountLoadingIndicatorProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();

return (
<ScreenWrapper
shouldShowOfflineIndicator={false}
Expand All @@ -26,27 +26,26 @@ function ReimbursementAccountLoadingIndicator(props) {
>
<HeaderWithBackButton
title={translate('reimbursementAccountLoadingAnimation.oneMoment')}
onBackButtonPress={props.onBackButtonPress}
onBackButtonPress={onBackButtonPress}
/>
<FullPageOfflineBlockingView>
<View style={[styles.pageWrapper]}>
<View style={styles.pageWrapper}>
<Lottie
source={LottieAnimations.ReviewingBankInfo}
autoPlay
loop
style={styles.loadingVBAAnimation}
webStyle={styles.loadingVBAAnimationWeb}
/>
<View style={[styles.ph6]}>
<Text style={[styles.textAlignCenter]}>{translate('reimbursementAccountLoadingAnimation.explanationLine')}</Text>
<View style={styles.ph6}>
<Text style={styles.textAlignCenter}>{translate('reimbursementAccountLoadingAnimation.explanationLine')}</Text>
</View>
</View>
</FullPageOfflineBlockingView>
</ScreenWrapper>
);
}

ReimbursementAccountLoadingIndicator.propTypes = propTypes;
ReimbursementAccountLoadingIndicator.displayName = 'ReimbursementAccountLoadingIndicator';

export default ReimbursementAccountLoadingIndicator;

0 comments on commit 1d17193

Please sign in to comment.