diff --git a/screens/Login.js b/screens/Login.js index 4aff981a..73c61829 100644 --- a/screens/Login.js +++ b/screens/Login.js @@ -1,4 +1,4 @@ -import React, { Fragment } from 'react' +import React, { Component, Fragment } from 'react' import { StyleSheet, SafeAreaView, View } from 'react-native' import { Button } from 'react-native-elements' import { Formik } from 'formik' @@ -20,7 +20,7 @@ const validationSchema = Yup.object().shape({ .min(4, 'Password must have more than 4 characters ') }) -export default class Login extends React.Component { +export default class Login extends Component { goToSignup = () => this.props.navigation.navigate('Signup') handleSubmit = values => { diff --git a/screens/Signup.js b/screens/Signup.js index 5dd954ac..1511e65c 100644 --- a/screens/Signup.js +++ b/screens/Signup.js @@ -1,4 +1,4 @@ -import React, { Fragment } from 'react' +import React, { Component, Fragment } from 'react' import { StyleSheet, SafeAreaView, View } from 'react-native' import { Button } from 'react-native-elements' import { Formik } from 'formik' @@ -8,6 +8,7 @@ import FormButton from '../components/FormButton' import ErrorMessage from '../components/ErrorMessage' import AppLogo from '../components/AppLogo' import { HideWithKeyboard } from 'react-native-hide-with-keyboard' + const validationSchema = Yup.object().shape({ name: Yup.string() .label('Name') @@ -26,7 +27,7 @@ const validationSchema = Yup.object().shape({ .required('Confirm Password is required') }) -export default class Signup extends React.Component { +export default class Signup extends Component { goToLogin = () => this.props.navigation.navigate('Login') handleSubmit = values => {