File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
import React, {useContext, useState} from 'react';
import Button from '../component/Button';
import Input from '../component/Input';
import {View, StyleSheet, ScrollView, Image, Text} from 'react-native';
import {
container,
pageTitleBox,
pageTitle,
} from './../resoureces/styles/GlobalStyles';
import {AuthContext} from './../context/AuthContext';
import LinearGradient from 'react-native-linear-gradient';
export default function Login({navigation}) {
const {onClickLogin} = useContext(AuthContext);
const [inputId, setInputId] = useState();
const [inputPw, setInputPw] = useState();
return (
<View style={{flex: 1}}>
{/* <View style={pageTitleBox}>
<Text style={pageTitle}>로그인</Text>
</View> */}
<View style={container}>
{/* <ScrollView> */}
<View style={styles.loginLogo}>
<Image
source={require('../resoureces/files/images/login_logo_2.png')}
style={styles.image1}
/>
</View>
<View>
<Input
onChangeText={inputId => {
setInputId(inputId);
}}
placeholder="아이디"
/>
<Input
onChangeText={inputPw => {
setInputPw(inputPw);
}}
secureTextEntry={true}
placeholder="비밀번호"
/>
</View>
<View style={styles.buttonContainer}>
<Button
title={'로그인'}
backgroundColor={'#357af9'}
padding={10}
marginBottom={10}
color={'#ffffff'}
textAlign={'center'}
onPress={() => {
onClickLogin(inputId, inputPw);
}}
/>
{/* <Button
title={'회원가입'}
backgroundColor={'#0028af'}
padding={10}
marginBottom={10}
color={'#ffffff'}
textAlign={'center'}
onPress={() => {
navigation.navigate('Agreement');
}}
/> */}
</View>
{/* <View style={styles.buttonContainer}>
<Button
title={'아이디찾기'}
onPress={() => {
navigation.navigate('FindID');
}}
color={'#323232'}
padding={10}
/>
<Button
title={'비밀번호찾기'}
onPress={() => {
navigation.navigate('FindPassword');
}}
color={'#323232'}
padding={10}
/>
</View> */}
{/* </ScrollView> */}
</View>
</View>
);
}
const styles = StyleSheet.create({
buttonContainer: {
flex: 1,
},
loginLogo: {
justifyContent: 'center',
alignItems: 'center',
flex: 1,
},
image1: {
width: '70%',
resizeMode: 'contain',
},
});