diff --git a/app/views/ForgotPasswordView.tsx b/app/views/ForgotPasswordView.tsx index fba86105c..5ab4775e4 100644 --- a/app/views/ForgotPasswordView.tsx +++ b/app/views/ForgotPasswordView.tsx @@ -1,5 +1,3 @@ -import { RouteProp } from '@react-navigation/native'; -import { StackNavigationProp } from '@react-navigation/stack'; import React from 'react'; import { Text } from 'react-native'; @@ -10,10 +8,11 @@ import I18n from '../i18n'; import { themes } from '../lib/constants'; import { Services } from '../lib/services'; import { OutsideParamList } from '../stacks/types'; -import { TSupportedThemes, withTheme } from '../theme'; +import { withTheme } from '../theme'; import { showErrorAlert } from '../utils/info'; import isValidEmail from '../utils/isValidEmail'; import { events, logEvent } from '../utils/log'; +import { IBaseScreen } from '../definitions'; import sharedStyles from './Styles'; interface IForgotPasswordViewState { @@ -22,14 +21,10 @@ interface IForgotPasswordViewState { isFetching: boolean; } -interface IForgotPasswordViewProps { - navigation: StackNavigationProp; - route: RouteProp; - theme: TSupportedThemes; -} +type IForgotPasswordViewProps = IBaseScreen; class ForgotPasswordView extends React.Component { - static navigationOptions = ({ route }: Pick) => ({ + static navigationOptions = ({ route }: IForgotPasswordViewProps) => ({ title: route.params?.title ?? 'Rocket.Chat' });