SignUp.js 1.38 KB
import React, {useState, useContext, useEffect, useCallback} from 'react';
import {View, Text, Button, TextInput, TouchableOpacity, StyleSheet} from 'react-native';
import {useDispatch, useSelector} from "react-redux";
import {useNavigation} from '@react-navigation/native';
import SignUpComponent from "../components/SignUpComponent";


const SignUp = (props) => {
    const navigation = useNavigation();
    const [loading, setLoading] = useState(true);
    const [isLogin, setIsLogin] = useState(true);

    const {me} = useSelector(state => state.user);
    const {isLoggingIn} = useSelector(state => state.user);

    const changeIsLogin = () => {
        return setIsLogin(!isLogin);
    }

    useEffect(() => {
        setLoading(false);
    }, [me]);

    return (
        <View style={styles.changeStyle}>
            <View style={styles.loginStyle}>
                <Text style={styles.inputText}>회원가입</Text>
                <SignUpComponent/>
            </View>
        </View>
    )
};

export default SignUp;

const styles = StyleSheet.create({
    changeStyle: {
        flex: 2,
        alignItems: 'center',
        justifyContent: 'center',
        borderColor: 'darkgrey',
    },
    loginStyle: {
        flex: 1,
        marginTop: 30,
    },
    inputText: {
        borderColor: 'darkgrey',
        fontWeight: 'bold',
        fontSize: 20,
        marginBottom: 10
    }

});