Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React Native SyntaxError ","

$
0
0

Receiving syntax error, SyntaxError: Unexpected token, expected ",". It is for the third to last line ");"

I am having trouble seeing where I need to insert the ",". I have tried in front of the ); and after. No luck. This is while I was adding the code for google sign in for ios. Would appreciate any assistance.

    render() {
        LayoutAnimation.easeInEaseOut();
        const scrollEnabled = this.state.screenHeight > height;
        return (this.state.logedin ?
            <View style={styles.container}>
                <StatusBar barStyle="light-content"></StatusBar>
                <ScrollView
                    style={{ flex: 1 }}
                    contentContainerStyle={styles.scrollview}
                    scrollEnabled={scrollEnabled}
                    onContentSizeChange={this.onContentSizeChange}
                >
                    <ImageBackground source={require("/Users/carloscraig/NoExcusasRN/screens/assets/grassbcg2.png")}
                        style={{ width: '100%', height: '100%' }}>
                        <Image source={require("/Users/carloscraig/NoExcusasRN/screens/assets/noexlogo.png")}
                            style={styles.logo}>
                        </Image>

                        <Text style={styles.greeting}>{'BIENVENIDO!'}</Text>

                        <View style={styles.errorMessage}>
                            {this.state.errorMessage && <Text style={styles.error}>{this.state.errorMessage}</Text>}
                        </View>

                        <View style={styles.form}>
                            <View>
                                <Text style={styles.inputTitle}>correo electrónico</Text>
                                <TextInput
                                    style={styles.input}
                                    autoCapitalize="none"
                                    onChangeText={email => this.setState({ email })}
                                    value={this.state.email}
                                ></TextInput>
                            </View>

                            <View style={{ marginTop: 32 }}>
                                <Text style={styles.inputTitle}>contraseña</Text>
                                <TextInput
                                    style={styles.input}
                                    secureTextEntry
                                    autoCapitalize="none"
                                    onChangeText={password => this.setState({ password })}
                                    value={this.state.password}
                                ></TextInput>
                            </View>
                        </View>

                        <TouchableOpacity style={styles.button} onPress={this.handleLogin}>
                            <Text style={{ color: "#FFF", fontWeight: "500" }}>Iniciar Sesión</Text>
                        </TouchableOpacity>

                        <SafeAreaView style={{
                            flex: 1,
                            justifyContent: 'center'
                        }}>
                            <Image style={{
                                width: 300,
                                height:300,
                                justifyContent: 'center',
                                alignSelf: 'center'
                            }} source={{uri: this.state.photo}} />
                            <Text>{this.state.name}</Text>
                            <Text>{this.state.email}</Text>
                            </SafeAreaView>:
                            <SafeAreaView style={{
                                flex: 1,
                                justifyContent: 'center',
                                alignItems: 'center'
                            }}>
                            <GoogleSigninButton
                                style={{ width: 192, height: 48 }}
                                size={GoogleSigninButton.Size.Wide}
                                color={GoogleSigninButton.Color.Light}
                                onPress={this._signIn}
                                disabled={this.state.isSigninInProgress} />
                        </SafeAreaView>

                       <TouchableOpacity
                            style={{ alignSelf: "center", marginTop: 32 }}
                            onPress={() => this.props.navigation.navigate("Register")}
                        >
                            <Text style={{ color: "#414959", fontSize: 13 }}>
                                No tienes una Cuenta? <Text style={{ fontWeight: "500", color: "#E9446A" }}>Regístrate</Text>
                            </Text>
                        </TouchableOpacity>
                    </ImageBackground>
                </ScrollView>
            </View>


        );
   }
}

Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>