chore: evaluate `LoginView` (#4098)
This commit is contained in:
parent
99409d1af4
commit
784b016736
|
@ -1,6 +1,6 @@
|
||||||
import { dequal } from 'dequal';
|
import { dequal } from 'dequal';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Alert, Keyboard, StyleSheet, Text, View } from 'react-native';
|
import { Alert, Keyboard, StyleSheet, Text, View, TextInput as RNTextInput } from 'react-native';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { loginRequest } from '../actions/login';
|
import { loginRequest } from '../actions/login';
|
||||||
|
@ -64,8 +64,13 @@ interface ILoginViewProps extends IBaseScreen<OutsideParamList, 'LoginView'> {
|
||||||
inviteLinkToken: string;
|
inviteLinkToken: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LoginView extends React.Component<ILoginViewProps, any> {
|
interface ILoginViewState {
|
||||||
private passwordInput: any;
|
user: string;
|
||||||
|
password: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
class LoginView extends React.Component<ILoginViewProps, ILoginViewState> {
|
||||||
|
private passwordInput: RNTextInput | null | undefined;
|
||||||
|
|
||||||
static navigationOptions = ({ route, navigation }: ILoginViewProps) => ({
|
static navigationOptions = ({ route, navigation }: ILoginViewProps) => ({
|
||||||
title: route?.params?.title ?? 'Rocket.Chat',
|
title: route?.params?.title ?? 'Rocket.Chat',
|
||||||
|
@ -160,7 +165,7 @@ class LoginView extends React.Component<ILoginViewProps, any> {
|
||||||
returnKeyType='next'
|
returnKeyType='next'
|
||||||
onChangeText={(value: string) => this.setState({ user: value })}
|
onChangeText={(value: string) => this.setState({ user: value })}
|
||||||
onSubmitEditing={() => {
|
onSubmitEditing={() => {
|
||||||
this.passwordInput.focus();
|
this.passwordInput?.focus();
|
||||||
}}
|
}}
|
||||||
testID='login-view-email'
|
testID='login-view-email'
|
||||||
textContentType='username'
|
textContentType='username'
|
||||||
|
|
Loading…
Reference in New Issue