diff --git a/app/views/E2EHowItWorksView.js b/app/views/E2EHowItWorksView.tsx similarity index 68% rename from app/views/E2EHowItWorksView.js rename to app/views/E2EHowItWorksView.tsx index 0ac1c756b..0fbdf77a1 100644 --- a/app/views/E2EHowItWorksView.js +++ b/app/views/E2EHowItWorksView.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import PropTypes from 'prop-types'; +import { StackNavigationProp } from '@react-navigation/stack'; +import { RouteProp } from '@react-navigation/native'; import { StyleSheet } from 'react-native'; import SafeAreaView from '../containers/SafeAreaView'; @@ -21,8 +22,17 @@ const styles = StyleSheet.create({ } }); -class E2EHowItWorksView extends React.Component { - static navigationOptions = ({ route, navigation }) => { +interface INavigation { + navigation: StackNavigationProp; + route: RouteProp<{ E2EHowItWorksView: { showCloseModal: boolean } }, 'E2EHowItWorksView'>; +} + +interface IE2EHowItWorksViewProps extends INavigation { + theme: string; +} + +class E2EHowItWorksView extends React.Component { + static navigationOptions = ({ route, navigation }: INavigation) => { const showCloseModal = route.params?.showCloseModal; return { title: I18n.t('How_It_Works'), @@ -30,20 +40,21 @@ class E2EHowItWorksView extends React.Component { }; }; - static propTypes = { - theme: PropTypes.string - }; - render() { const { theme } = this.props; const infoStyle = [styles.info, { color: themes[theme].bodyText }]; + // TODO: Refactor when migrate Markdown return ( + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} );