App.js
`
import React, { useState } from “react”;
import LoginScreen from “./app/screens/LoginScreen”;
export default function App() {
return ;
}
LoginScreen.js
import React, { useState } from ‘react’;
import { StyleSheet, Image } from ‘react-native’;
import AppTextInput from ‘…/components/AppTextInput’;
import Screen from ‘…/components/Screen’;
import SubmitButton from ‘…/components/SubmitButton’;
function LoginScreen(props) {
const [email, setEmail] = useState();
const [password, setPassword] = useState();
return (
<Screen>
<Image
style={styles.logo}
source={require("../assets/logo-red.png")} />
<AppTextInput
autoCapitalize="none"
autoCorrect={false}
icon="email"
keyboardType="email-address"
name="email"
placeholder="Email "
// iOS only feature from keychain
textContentType="emailAddress"
/>
<AppTextInput
autoCapitalize="none"
autoCorrect={false}
icon="lock"
name="password"
placeholder="Password "
secureTextEntry
textContentType="password"
/>
<SubmitButton title="Login" />
</Screen>
);
}
const styles = StyleSheet.create({
container: {
padding: 10,
},
logo: {
width: 80,
height: 80,
alignSelf: “center”,
marginTop: 50,
marginBottom: 20,
},
})
export default LoginScreen;
AppButton.js
import React from “react”;
import { StyleSheet, Text, TouchaleOpacity } from “react-native”;
import colors from “…/config/colors”;
function AppButton({ title, onPress, color = “primary” }) {
return (
<TouchaleOpacity style={[styles.button, { backgroundColor: colors[color] }]} onPress={onPress}>
{title}
)
}
const styles = StyleSheet.create({
button: {
backgroundColor: colors.primary,
borderRadius: 25,
justifyContent: “center”,
alignItems: “center”,
padding: 15,
marginVertical: 10,
},
text: {
color: colors.white,
fontSize: 18,
},
})
`
SubmitButton.js
import React from "react";
import { StyleSheet, Text, TouchaleOpacity } from "react-native";
import colors from "../config/colors";
function AppButton({ title, onPress, color = "primary" }) {
return (
<TouchaleOpacity style={[styles.button, { backgroundColor: colors[color] }]} onPress={onPress}>
<Text style={StyleSheet.text}>{title}</Text>
</TouchaleOpacity>
)
}
const styles = StyleSheet.create({
button: {
backgroundColor: colors.primary,
borderRadius: 25,
justifyContent: "center",
alignItems: "center",
padding: 15,
marginVertical: 10,
},
text: {
color: colors.white,
fontSize: 18,
},
})
Having problem with line 36 of LoginScreen.js