Remove compat

This commit is contained in:
Diego Mello 2020-05-26 17:20:37 -03:00
parent c60bdfb208
commit 0bda8599c1
7 changed files with 9 additions and 18 deletions

View File

@ -5,7 +5,6 @@ import {
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Base64 } from 'js-base64';
import { withNavigation } from '@react-navigation/compat';
import { withTheme } from '../theme';
import sharedStyles from '../views/Styles';
@ -361,4 +360,4 @@ const mapDispatchToProps = dispatch => ({
loginRequest: params => dispatch(loginRequestAction(params))
});
export default connect(mapStateToProps, mapDispatchToProps)(withTheme(withNavigation(LoginServices)));
export default connect(mapStateToProps, mapDispatchToProps)(withTheme(LoginServices));

View File

@ -13,7 +13,6 @@ import I18n from '../i18n';
import { LegalButton } from '../containers/HeaderButton';
import { themes } from '../constants/colors';
import { withTheme } from '../theme';
import { themedHeader } from '../utils/navigation';
import FormContainer, { FormContainerInner } from '../containers/FormContainer';
import TextInput from '../containers/TextInput';
import { loginRequest as loginRequestAction } from '../actions/login';
@ -195,11 +194,11 @@ class LoginView extends React.Component {
}
render() {
const { Accounts_ShowFormLogin, theme } = this.props;
const { Accounts_ShowFormLogin, theme, navigation } = this.props;
return (
<FormContainer theme={theme} testID='login-view'>
<FormContainerInner>
<LoginServices separator={Accounts_ShowFormLogin} />
<LoginServices separator={Accounts_ShowFormLogin} navigation={navigation} />
{this.renderUserForm()}
</FormContainerInner>
</FormContainer>

View File

@ -13,7 +13,6 @@ import I18n from '../i18n';
import { LegalButton } from '../containers/HeaderButton';
import { themes } from '../constants/colors';
import { withTheme } from '../theme';
import { themedHeader } from '../utils/navigation';
import FormContainer, { FormContainerInner } from '../containers/FormContainer';
import TextInput from '../containers/TextInput';
import isValidEmail from '../utils/isValidEmail';
@ -224,11 +223,11 @@ class RegisterView extends React.Component {
render() {
const { saving } = this.state;
const { theme, showLoginButton } = this.props;
const { theme, showLoginButton, navigation } = this.props;
return (
<FormContainer theme={theme} testID='register-view'>
<FormContainerInner>
<LoginServices />
<LoginServices navigation={navigation} />
<Text style={[styles.title, sharedStyles.textBold, { color: themes[theme].titleText }]}>{I18n.t('Sign_Up')}</Text>
<TextInput
label='Name'

View File

@ -5,7 +5,6 @@ import {
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import equal from 'deep-equal';
import { withNavigation } from '@react-navigation/compat';
import RNUserDefaults from 'rn-user-defaults';
import { toggleServerDropdown as toggleServerDropdownAction } from '../../actions/rooms';
@ -291,4 +290,4 @@ const mapDispatchToProps = dispatch => ({
appStart: params => dispatch(appStartAction(params))
});
export default withNavigation(connect(mapStateToProps, mapDispatchToProps)(withTheme(withSplit(ServerDropdown))));
export default connect(mapStateToProps, mapDispatchToProps)(withTheme(withSplit(ServerDropdown)));

View File

@ -830,7 +830,8 @@ class RoomsListView extends React.Component {
showUnread,
showServerDropdown,
showSortDropdown,
theme
theme,
navigation
} = this.props;
return (
@ -846,7 +847,7 @@ class RoomsListView extends React.Component {
showUnread={showUnread}
/>
) : null}
{showServerDropdown ? <ServerDropdown /> : null}
{showServerDropdown ? <ServerDropdown navigation={navigation} /> : null}
</SafeAreaView>
);
};

View File

@ -30,7 +30,6 @@
"@react-native-community/datetimepicker": "2.3.2",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/slider": "2.0.9",
"@react-navigation/compat": "^5.1.23",
"@react-navigation/drawer": "^5.7.7",
"@react-navigation/native": "^5.4.2",
"@react-navigation/stack": "^5.3.9",

View File

@ -1764,11 +1764,6 @@
resolved "https://registry.yarnpkg.com/@react-native-community/viewpager/-/viewpager-2.0.2.tgz#622b190294b1310c4825c98daeaee1c8443f7124"
integrity sha512-CKVhIZdX/Cmb80muog8sKpi5vM8npwFp4tx4Dj1IvTBidZweuO22+VH2rDOj7E0LzdV9IYRJ4FGBwcPBD2qUrQ==
"@react-navigation/compat@^5.1.23":
version "5.1.23"
resolved "https://registry.yarnpkg.com/@react-navigation/compat/-/compat-5.1.23.tgz#2e43727815919c38ef7bd198cdbf0ca08ec85599"
integrity sha512-JczqRNZujNcz32SsNJeBEcMatsQix/9MIPOXZcAnmUV8UxYpcXt8NKD0Us60evqVc8pZDTV3vCLvAOkOY7OxeA==
"@react-navigation/core@^5.8.1":
version "5.8.1"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.8.1.tgz#4f0d744a10eec7dc8bfad2901eec5fb9623b0972"