components/SignButtons.js
import React from 'react'; import {StyleSheet, View} from 'react-native'; import CustomButton from '../components/CustomButton'; import {useNavigation} from '@react-navigation/native'; function ({isSignUp, onSubmit}) { const navigation (); const primaryTitle isSignUp '회원가입' '로그인'; const secondaryTitle isSignUp '로그인' '회원가입'; const () => { if (isSignUp) { navigation. (); } else { navigation. ('SignIn',{isSignUp: true}); } }; return ( <View style={styles.buttons}> <CustomButton title={primaryTitle} hasMarginBottom onPress={onSubmit} /> <CustomButton title={secondaryTitle} theme="secondary" onPress={onSecondaryButtonPress} /> </View> ); } const styles StyleSheet. ({ buttons: { marginTop: 64, }, }); export default SignButtons;