From d720b5aca9e21ae06caa2050213cf9482b497ffd Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Tue, 3 May 2022 12:33:35 -0400 Subject: [PATCH] Chore: evaluate `ForgotPasswordView` (#4106) --- app/views/ForgotPasswordView.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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' });