diff --git a/package.json b/package.json index 1c6496500..c61caa72d 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "react-native-photo-view": "^1.5.2", "react-native-safari-view": "^2.0.0", "react-native-search-bar": "^3.0.0", + "react-native-swiper": "^1.5.13", "react-native-syntax-highlighter": "^1.2.1", "react-native-table-component": "^1.0.5", "react-native-vector-icons": "^4.4.0", @@ -87,7 +88,6 @@ "redux-persist-transform-encrypt": "^1.0.2", "redux-thunk": "^2.2.0", "reselect": "^3.0.1", - "rn-app-intro": "^0.0.4", "styled-components": "^2.2.1" }, "devDependencies": { diff --git a/src/auth/screens/login.screen.js b/src/auth/screens/login.screen.js index 6271beea8..abcfd2e81 100644 --- a/src/auth/screens/login.screen.js +++ b/src/auth/screens/login.screen.js @@ -14,7 +14,7 @@ import { Modal, } from 'react-native'; import { Button, Icon } from 'react-native-elements'; -import AppIntro from 'rn-app-intro'; +import Swiper from 'react-native-swiper'; import queryString from 'query-string'; import { ViewContainer } from 'components'; @@ -99,6 +99,14 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', }, + signInContainer: { + position: 'absolute', + right: 0, + left: 0, + bottom: 80, + justifyContent: 'center', + alignItems: 'center', + }, slide: { flex: 1, justifyContent: 'center', @@ -219,6 +227,12 @@ class Login extends Component { } }; + shouldDisplayIntro() { + const { isLoggingIn, isAuthenticated } = this.props; + + return !isAuthenticated && !isLoggingIn && this.state.asyncStorageChecked; + } + renderLoading() { return ( @@ -229,130 +243,120 @@ class Login extends Component { } render() { - const { locale, isLoggingIn, isAuthenticated } = this.props; + const { locale, isLoggingIn } = this.props; return ( - {!isAuthenticated && - !isLoggingIn && - this.state.asyncStorageChecked && ( - - null} - visible={this.state.modalVisible} - style={styles.container} - > - - - this.toggleCancelButton(e, true)} - onLoadEnd={e => this.toggleCancelButton(e, false)} - onNavigationStateChange={e => - this.onNavigationStateChange(e)} - renderLoading={() => this.renderLoading()} - startInLoadingState - /> - - -