diff --git a/app/src/component/AgeValidator.js b/app/src/component/AgeValidator.js index c7adad4..e300da3 100644 --- a/app/src/component/AgeValidator.js +++ b/app/src/component/AgeValidator.js @@ -2,6 +2,8 @@ export const MAX_AVAILABLE_AGE = 99; export const MIN_AVAILABLE_AGE = 1; export default class AgeValidator { validateAge = (minAge: Number, maxAge: Number) => { + + console.log("minAge", minAge, maxAge); return ( minAge >= MIN_AVAILABLE_AGE && minAge <= MAX_AVAILABLE_AGE && diff --git a/app/src/constant/HttpProperty.js b/app/src/constant/HttpProperty.js index 7ad8990..20ad5d0 100644 --- a/app/src/constant/HttpProperty.js +++ b/app/src/constant/HttpProperty.js @@ -1,4 +1,5 @@ -const BASE_URL = 'http://ec2-18-219-75-164.us-east-2.compute.amazonaws.com'; +// const BASE_URL = 'http://ec2-18-219-75-164.us-east-2.compute.amazonaws.com'; +const BASE_URL = 'http://10.0.2.2:10753'; // for local emulator and local server; const VERSION = '/v1'; export const SERVER_URL = BASE_URL + VERSION; diff --git a/app/src/dto/AccessTokenDto.js b/app/src/dto/AccessTokenDto.js new file mode 100644 index 0000000..3bd5460 --- /dev/null +++ b/app/src/dto/AccessTokenDto.js @@ -0,0 +1,7 @@ +export default class AccessTokenDto{ + accessToken; + + constructor(data = {}) { + Object.assign(this, data); + } +} \ No newline at end of file diff --git a/app/src/repository/FirebaseRepository.js b/app/src/repository/FirebaseRepository.js index 9580688..7c0292d 100644 --- a/app/src/repository/FirebaseRepository.js +++ b/app/src/repository/FirebaseRepository.js @@ -1,4 +1,3 @@ -import axios from 'axios'; import auth from '@react-native-firebase/auth'; import { SERVER_URL } from '../constant/HttpProperty'; diff --git a/app/src/repository/GroupCreationRepository.js b/app/src/repository/GroupCreationRepository.js index 055f679..ef18c6d 100644 --- a/app/src/repository/GroupCreationRepository.js +++ b/app/src/repository/GroupCreationRepository.js @@ -24,11 +24,17 @@ export default class GroupCreationRepository { return new GroupingCreationDto(commonResponse.data); } - async completeGroupRepresentImgUpload(groupingUserId, uri, failedCallback) { + async completeGroupRepresentImgUpload(groupingUserId, uri, fileName, fileType, failedCallback) { const imageFile = new FormData(); - imageFile.append('imageFile', uri.content); + imageFile.append('imageFile', { + name: fileName, + type: fileType, + uri: Platform.OS === 'android' ? uri : uri.replace('file://', ''), + }); const response = await axios - .post(`${TARGET_URL}/image`, groupingUserId, imageFile) + .post(`${TARGET_URL}/image`, groupingUserId, imageFile, { + headers: { 'Content-Type': 'multipart/form-data',} + }) .then(() => { console.log('group represent img upload complete'); }) diff --git a/app/src/repository/SignRepository.js b/app/src/repository/SignRepository.js index 50e078c..96e9bc6 100644 --- a/app/src/repository/SignRepository.js +++ b/app/src/repository/SignRepository.js @@ -1,17 +1,18 @@ import axios from 'axios'; -import { SIGN_URL } from '../constant/HttpProperty'; +import {SIGN_URL} from '../constant/HttpProperty'; import CommonResponse from '../dto/CommonResponse'; import CheckEmailResponseDto from '../dto/CheckEmailResponseDto'; import CheckPhoneNumberResponseDto from '../dto/CheckPhoneNumberResponseDto'; -import { ResponseCode } from '../constant/ResponseCode'; +import {ResponseCode} from '../constant/ResponseCode'; import GroupingUserDto from '../dto/GroupingUserDto'; +import AccessTokenDto from '../dto/AccessTokenDto'; const TARGET_URL = `${SIGN_URL}`; export default class SignRepository { async checkEmail(email, failedCallback) { const response = await axios.get(`${TARGET_URL}/email`, { - params: { email }, + params: {email}, }); const commonResponse = new CommonResponse(response.data); @@ -24,7 +25,7 @@ export default class SignRepository { } async enrollEmail(email, failedCallback) { - const response = await axios.post(`${TARGET_URL}/email`, { email }); + const response = await axios.post(`${TARGET_URL}/email`, {email}); const commonResponse = new CommonResponse(response.data); if (commonResponse.code !== ResponseCode.SUCCEED) { @@ -35,9 +36,9 @@ export default class SignRepository { } async checkPhoneNumber(phoneNumber, failedCallback) { - console.log('checkPhoneNumber1'); + console.log('checkPhoneNumber1', TARGET_URL); const response = await axios.get(`${TARGET_URL}/phone-number`, { - params: { 'phone-number': phoneNumber }, + params: {'phone-number': phoneNumber}, }); const commonResponse = new CommonResponse(response.data); @@ -51,6 +52,7 @@ export default class SignRepository { return new CheckPhoneNumberResponseDto(commonResponse.data); } + // deprecated async enrollPhoneNumber(phoneNumber, failedCallback) { console.log('enrollPhoneNumber1'); const response = await axios.post(`${TARGET_URL}/phone-number`, { @@ -115,12 +117,12 @@ export default class SignRepository { const commonResponse = new CommonResponse(response.data); if (commonResponse.code !== ResponseCode.SUCCEED) { - commonResponse.data; failedCallback(commonResponse.code); return; } - return new GroupingUserDto(commonResponse.data); +console.log("accessToken : "+ commonResponse.data); + return new AccessTokenDto(commonResponse.data); } async signInWithEmail(email, password, failedCallback) { diff --git a/app/src/repository/UserRepository.js b/app/src/repository/UserRepository.js index 7db83da..54f463d 100644 --- a/app/src/repository/UserRepository.js +++ b/app/src/repository/UserRepository.js @@ -4,10 +4,29 @@ import { USER_URL } from '../constant/HttpProperty'; import CommonResponse from '../dto/CommonResponse'; import { ResponseCode } from '../constant/ResponseCode'; import GroupingUserDto from '../dto/GroupingUserDto'; - +import getRealm from '../table/realm'; const TARGET_URL = `${USER_URL}`; export default class UserRepository { + + async setAccessToken(accessToken) { + const realm = await getRealm(); + console.log("realm path : "+ realm.path); + + realm.write(()=>{ + realm.create('User', {accessToken: accessToken}, 'modified') + }); + } + + async getUser() { + const realm = await getRealm(); + console.log("realm path : "+ realm.path); + let data = realm.objects('User'); + console.log("realm result : " + data); + return data; + } + + initialize = async () => { axios .post(`${TARGET_URL}/auth`, {}) diff --git a/app/src/store/GroupingCreationMainStore.js b/app/src/store/GroupingCreationMainStore.js index 35acd30..fbd66e2 100644 --- a/app/src/store/GroupingCreationMainStore.js +++ b/app/src/store/GroupingCreationMainStore.js @@ -26,6 +26,8 @@ export default class GroupingCreationMainStore { ageValidator = new AgeValidator(); + userStore = new UserStore(); + @observable groupingCreationViewStatus = GROUPING_CREATION_VIEW_STATUS.NAME; @observable groupingCreationDto = new GroupingCreationDto(); @@ -64,9 +66,11 @@ export default class GroupingCreationMainStore { // @observable groupingBackgroundImageURI = require('../assets/default_group_image.jpg'); @observable groupingBackgroundImageURI = ''; + @observable groupingBackgroundImageType = ''; + @observable groupingBackgroundImageName = ''; - constructor(groupingStore: GroupingStore) { - this.groupingStore = groupingStore; + constructor(userStore: UserStore) { + this.userStore = userStore; } @action groupingInitializeGender = () => { @@ -150,13 +154,16 @@ export default class GroupingCreationMainStore { this.availableAgeChanged = true; }; - @action groupingBackgroundImageChanged = ({ uri }) => { + @action groupingBackgroundImageChanged = ( uri, type, fileName ) => { + console.log("hohoiho", uri, type, fileName); if (Platform.OS === 'ios') { const askPermission = async () => { try { const result = await request(PERMISSIONS.IOS.PHOTO_LIBRARY); if (result === RESULTS.GRANTED) { - this.groupingBackgroundImageURI = { uri }; + this.groupingBackgroundImageURI = uri; + this.groupingBackgroundImageName = fileName; + this.groupingBackgroundImageType = type; console.log('background image changed IOS'); console.log(`IOS${this.groupingBackgroundImageURI}`); } @@ -166,7 +173,7 @@ export default class GroupingCreationMainStore { }; askPermission().then(); } - this.groupingBackgroundImageURI = { uri }; + this.groupingBackgroundImageURI = uri ; console.log('background image changed'); console.log(this.groupingBackgroundImageURI); }; @@ -217,16 +224,29 @@ export default class GroupingCreationMainStore { } @action groupCreation = async () => { + console.log("groupingCreationDto : ", this.groupingCreationDto.minUserAge, this.groupingCreationDto.maxUserAge); + this.groupingCreationDto.representGroupingUserId const response = await this.groupCreationRepository.completeGroupCreation( this.groupingCreationDto, (responseCode) => { - console.log(`responseCode : ${responseCode}`); } ); console.log(`response : ${response.data.code}`); + + const representImage = { + uri: this.getBackgroundImageURI, + type: this.getBackgroundImageType, + name: this.getBackgroundImageName, + }; + + console.log("file of photo : ", representImage); + + await this.groupCreationRepository.completeGroupRepresentImgUpload( this.groupingUserId, this.getBackgroundImageURI, + this.getBackgroundImageName, + this.getBackgroundImageType, (responseCode) => { console.log(`responseCode : ${responseCode}`); } @@ -263,6 +283,14 @@ export default class GroupingCreationMainStore { return this.groupingBackgroundImageURI; } + @computed get getBackgroundImageType() { + return this.groupingBackgroundImageType; + } + + @computed get getBackgroundImageName() { + return this.groupingBackgroundImageName; + } + @computed get selectedGenderLimitMessage() { if (this.genderChanged === false) { return '성별 제한 추가'; @@ -312,12 +340,14 @@ export default class GroupingCreationMainStore { this.groupingDescriptionCompleted = false; this.groupingAddressCompleted = false; this.groupingCreationDto = new GroupingCreationDto(); - this.groupingCreationDto.representGroupingUserId = new GroupingUserDto().groupingUserId; + this.groupingCreationDto.representGroupingUserId = this.userStore.getUserId; this.groupingCreationDto.isHidden = false; this.groupingCreationDto.pointX = 100; this.groupingCreationDto.pointY = 100; this.groupingCreationDto.hashtagList = []; this.selectedGender = ''; this.groupingBackgroundImageURI = ''; + this.groupingBackgroundImageName = ''; + this.groupingBackgroundImageType = ''; } } diff --git a/app/src/store/GroupingStore.js b/app/src/store/GroupingStore.js index 80a6952..7cd0236 100644 --- a/app/src/store/GroupingStore.js +++ b/app/src/store/GroupingStore.js @@ -12,7 +12,7 @@ export default class GroupingStore { groupTable = new GroupTable(); - groupingCreation: GroupingCreationDto; + groupingCreation = new GroupingCreationDto(); constructor(mainStore: MainStore) { this.mainStore = mainStore; diff --git a/app/src/store/ResetPasswordStore.js b/app/src/store/ResetPasswordStore.js index 5a50b4f..ed26b83 100644 --- a/app/src/store/ResetPasswordStore.js +++ b/app/src/store/ResetPasswordStore.js @@ -153,7 +153,7 @@ export default class res { isSucceed = true; console.log(isSucceed); } catch (e) { - console.log('인증번호 요청 에러'); + console.log('인증번호 요청 에러!'); this.phoneValidationViewStatus = SIGN_UP_PHONE_VIEW_STATUS.PHONE_CODE_SEND_ERROR; } if (isSucceed) { @@ -181,7 +181,6 @@ export default class res { return; } this.phoneValidationStatus = INPUT_PHONE_STATUS.PHONE_CODE_NOT_FORMATTED; - console.log(phoneCode.toString()); }; @action phoneCodeFocused = (index) => { diff --git a/app/src/store/SignInStore.js b/app/src/store/SignInStore.js index ee244c0..5c46879 100644 --- a/app/src/store/SignInStore.js +++ b/app/src/store/SignInStore.js @@ -65,6 +65,7 @@ export default class SignInStore { }; @action inputTextChanged = (inputText) => { + console.log("phone?", inputText); this.inputText = inputText; this.phoneNumberChanged(inputText); // 입력된 값 이메일 형태일 때 @@ -72,7 +73,7 @@ export default class SignInStore { this.emailTextChanged(inputText); } else if (this.phoneValidator.validatePhoneNumber(this.formattedPhoneNumber)) // 입력된 값 핸드폰번호 형태일 때 - this.phoneNumberTextChanged(inputText); + this.phoneNumberTextChanged(this.formattedPhoneNumber); if ( this.emailStatus === INPUT_EMAIL_STATUS.SUCCEED || @@ -141,13 +142,14 @@ export default class SignInStore { }; @action phoneNumberTextChanged = (text) => { + console.log("isPhone?", text) if (String(text).length === 0) { this.phoneStatus = INPUT_PHONE_STATUS.NONE; this.phoneNumberText = text; return; } - if (!this.phoneValidator.validatePhoneNumber(this.formattedPhoneNumber)) { + if (!this.phoneValidator.validatePhoneNumber(text)) { this.phoneStatus = INPUT_PHONE_STATUS.NOT_FORMATTED; this.phoneNumberText = text; return; @@ -189,6 +191,7 @@ export default class SignInStore { } @action signIn = async () => { + console.log("signIn?", this.inputText, this.passwordText); if (this.emailStatus === INPUT_EMAIL_STATUS.SUCCEED) { this.groupingUserDto = await this.signRepository.signInWithEmail( this.inputText, @@ -205,6 +208,7 @@ export default class SignInStore { } ); } else if (this.phoneStatus === INPUT_PHONE_STATUS.SUCCEED) { + console.log("signInWithPhone?", this.phoneNumberText, this.passwordText); this.groupingUserDto = await this.signRepository.signInWithPhone( this.phoneNumberText, this.passwordText, diff --git a/app/src/store/SignProcessStore.js b/app/src/store/SignProcessStore.js index 60d8207..b2b6257 100644 --- a/app/src/store/SignProcessStore.js +++ b/app/src/store/SignProcessStore.js @@ -43,11 +43,11 @@ export default class SignProcessStore { }; @action emailCompleted = async (email) => { - const isSucceed = await this.signRepository.enrollEmail(email, (responseCode) => {}); - if (isSucceed) { + // const isSucceed = await this.signRepository.enrollEmail(email, (responseCode) => {}); + // if (isSucceed) { this.groupingUserDto.email = email; this.signViewStatus = SIGN_VIEW_STATUS.EMAIL_COMPLETED; - } + // } }; @action passwordCompleted = (password) => { @@ -68,20 +68,20 @@ export default class SignProcessStore { @action birthdayCompleted = async (birthday) => { this.signViewStatus = SIGN_VIEW_STATUS.BIRTHDAY_COMPLETED; this.groupingUserDto.birthday = birthday; - const groupingUserDto = await this.signRepository.completeSignUp( + const accessTokenDto = await this.signRepository.completeSignUp( this.groupingUserDto, (responseCode) => {} ); - this.userStore.signUpCompleted(groupingUserDto); + this.userStore.signUpCompleted(accessTokenDto); }; @action phoneCompleted = async (phoneNumber) => { - const isSucceed = await this.signRepository.enrollPhoneNumber(phoneNumber, () => {}); + // const isSucceed = await this.signRepository.enrollPhoneNumber(phoneNumber, () => {}); - if (isSucceed === true) { + // if (isSucceed === true) { this.signViewStatus = SIGN_VIEW_STATUS.PHONE_COMPLETED; this.groupingUserDto.phoneNumber = phoneNumber; - } + // } }; @action termsAgreementCompleted = async () => {}; diff --git a/app/src/store/SignUpPhoneStore.js b/app/src/store/SignUpPhoneStore.js index e345cf2..b7be61e 100644 --- a/app/src/store/SignUpPhoneStore.js +++ b/app/src/store/SignUpPhoneStore.js @@ -114,17 +114,22 @@ export default class SignUpPhoneStore { @action sendPhoneCode = async () => { console.log('send code'); let isSucceed = false; - const data = await this.signRepository.checkPhoneNumber(this.phoneNumber, (responseCode) => {}); + const data = await this.signRepository.checkPhoneNumber(this.phoneNumber, (responseCode) => { + console.log("fail", responseCode); + }); + console.log("after send code.1", data); if (data.phoneNumberAvailable !== true) { + console.log("berfore send code.!11", data); this.phoneValidationStatus = INPUT_PHONE_STATUS.PHONE_NUMBER_ALREADY_EXISTED; return; } try { + console.log("berfore send code.", data); this.codeConfirmation = await this.firebaseRepository.sendSignUpPhoneCode(this.phoneNumber); console.log(this.codeConfirmation); isSucceed = true; } catch (e) { - console.log('인증번호 요청 에러'); + console.log('인증번호 요청 에러', e); this.phoneValidationViewStatus = SIGN_UP_PHONE_VIEW_STATUS.PHONE_CODE_SEND_ERROR; } if (isSucceed) { diff --git a/app/src/store/UserStore.js b/app/src/store/UserStore.js index 1efbd52..582679f 100644 --- a/app/src/store/UserStore.js +++ b/app/src/store/UserStore.js @@ -1,7 +1,7 @@ import { observable, action, computed } from 'mobx'; import UserRepository from '../repository/UserRepository'; import { USER_STATUS } from '../constant/UserStatus'; -import GroupingUserDto from '../dto/GroupingUserDto'; +import AccessTokenDto from '../dto/AccessTokenDto'; import UserTable from '../table/UserTable'; export default class UserStore { @@ -14,6 +14,7 @@ export default class UserStore { @observable userStatus = USER_STATUS.GUEST; @action ready = async () => { + console.log("hello~~~~~~ userStore"); await this.userTable.findByEmail(this.groupingUser.email); await this.userRepository.initialize(); // this.userStatus = USER_STATUS.GUEST; @@ -34,8 +35,13 @@ export default class UserStore { this.userStatus = USER_STATUS.USER; }; - @action signUpCompleted = (groupingUserDto: GroupingUserDto) => { - this.groupingUser = groupingUserDto; + @action signUpCompleted = async (accessTokenDto: AccessTokenDto) => { + console.log("signup completed : " + accessTokenDto.accessToken); + console.log("userTable : " + this.userTable); + let data = await this.userRepository.setAccessToken(accessTokenDto.accessToken); + let result = await this.userRepository.getUser(); + console.log("hello : " + data); + console.log("ended : "+ result); this.userStatus = USER_STATUS.USER; }; diff --git a/app/src/store/index.js b/app/src/store/index.js index a5585d0..4eeef73 100644 --- a/app/src/store/index.js +++ b/app/src/store/index.js @@ -24,7 +24,7 @@ const signUpBasicInfoStore = new SignUpBasicInfoStore(signProcessStore); const signUpTermsAgreementStore = new SignUpTermsAgreementStore(signProcessStore); const mainStore = new MainStore(); const groupingStore = new GroupingStore(mainStore); -const groupingCreationMainStore = new GroupingCreationMainStore(); +const groupingCreationMainStore = new GroupingCreationMainStore(userStore); const chatRoomStore = new ChatRoomStore(); const chatStore = new ChatStore(mainStore); const friendListStore = new FriendListStore(); diff --git a/app/src/table/GroupTable.js b/app/src/table/GroupTable.js index d7a3e35..eb8398b 100644 --- a/app/src/table/GroupTable.js +++ b/app/src/table/GroupTable.js @@ -8,8 +8,8 @@ export default class GroupTable { return realm.create('Group', { title: groupingCreationDto.title, isHidden: groupingCreationDto.isHidden, - minAge: groupingCreationDto.minAge, - maxAge: groupingCreationDto.maxAge, + minAge: groupingCreationDto.minUserAge, + maxAge: groupingCreationDto.maxUserAge, gender: groupingCreationDto.gender, pointX: groupingCreationDto.pointX, pointY: groupingCreationDto.pointY, diff --git a/app/src/table/UserTable.js b/app/src/table/UserTable.js index 9f487c4..493f600 100644 --- a/app/src/table/UserTable.js +++ b/app/src/table/UserTable.js @@ -1,43 +1,60 @@ -import GroupingUserDto from '../dto/GroupingUserDto'; - const Realm = require('realm'); export default class UserTable { - create = async (groupingUserDto: GroupingUserDto) => { - await Realm.open({ schema: [UserTable] }).then((realm) => { - return realm.create('User', { - name: groupingUserDto.name, - userStatus: groupingUserDto.userStatus, - email: groupingUserDto.email, - nationCode: groupingUserDto.nationCode, - phoneNumber: groupingUserDto.phoneNumber, - userId: groupingUserDto.userId, - gender: groupingUserDto.gender, - birthday: groupingUserDto.birthday, - representProfileImage: groupingUserDto.representProfileImage, - }); - }); - }; + static schema = { + name: 'User', + primaryKey: 'accessToken', + properties: { + accessToken: 'string', + userStatus: 'string?', + email: 'string?', + nationCode: 'string?', + phoneNumber: 'string?', + name: 'string?', + userId: 'string?', + gender: 'string?', + birthday: 'date?', + representProfileImage: 'string?', + }, + }; + - findByEmail = async (email: String) => { - await Realm.open({ schema: [UserTable] }).then((realm) => { - const user = realm.objects('User').filtered('email = $0', email); - console.log(user); - }); - }; -} -UserTable.schema = { - name: 'User', - properties: { - userStatus: 'string', - email: 'string', - nationCode: 'string', - phoneNumber: 'string', - name: 'string', - userId: 'string?', - gender: 'string', - birthday: 'date', - representProfileImage: 'string?', - }, +//create = async (userAccessToken: String) => { +// await Realm.open({schema: [UserTable],schemaVersion:5 }).then(async(realm) => { +// await realm.write(async() => { +// console.log("why? : "+ realm); +// realm.create('User', { +// accessToken: userAccessToken +// }); +// }); +// realm.close(); +// }); +// }; +// +// +//// create = async (userAccessToken: String) => { +// +//// await Realm.open({schema: [UserTable]}).then((realm) => { +//// return realm.create('User', { +//// accessToken: userAccessToken +//// }); +//// }); +//// }; +// +// findUser = async() => { +// await Realm.open({schema: [UserTable], schemaVersion: 5}).then((realm) => { +// const user = realm.objects('User'); +// console.log(user); +// realm.close(); +// return user; +// }); +// } +// +// findByEmail = async (email: String) => { +// await Realm.open({schema: [UserTable]}).then((realm) => { +// const user = realm.objects('User').filtered('email = $0', email); +// console.log(user); +// }); +// }; }; diff --git a/app/src/table/realm.js b/app/src/table/realm.js new file mode 100644 index 0000000..791239c --- /dev/null +++ b/app/src/table/realm.js @@ -0,0 +1,10 @@ +import Realm from 'realm'; + +import UserTable from './UserTable'; + +export default function getRealm() { + return Realm.open({ + schema: [UserTable], + schemaVersion: 6, + }); +} diff --git a/app/src/view/main/home/components/creation/NewGroupPreview.js b/app/src/view/main/home/components/creation/NewGroupPreview.js index b41550b..9259e0e 100644 --- a/app/src/view/main/home/components/creation/NewGroupPreview.js +++ b/app/src/view/main/home/components/creation/NewGroupPreview.js @@ -9,7 +9,7 @@ import { StatusBar, } from 'react-native'; import { inject, observer } from 'mobx-react'; -import ImagePicker from 'react-native-image-picker'; +import {launchImageLibrary} from 'react-native-image-picker'; import { StackActions } from '@react-navigation/native'; import GroupName from './GroupName'; import GroupingUserDto from '../../../../../dto/GroupingUserDto'; @@ -45,6 +45,8 @@ const NewGroupPreview = (props) => { props.groupingCreationMainStore.groupingCreationViewChanged( GROUPING_CREATION_VIEW_STATUS.CONFIRM ); + console.log("onHeaderNextButtonClicked"); + props.groupingCreationMainStore .groupCreation() .then(props.navigation.dispatch(StackActions.popToTop())); @@ -52,25 +54,20 @@ const NewGroupPreview = (props) => { const showPicker = () => { const options = { - title: 'Select Avatar', - storageOptions: { - skipBackup: true, - path: 'images', - }, + mediaType:'photo', }; - ImagePicker.showImagePicker(options, (response) => { + launchImageLibrary(options, (response) => { if (response.didCancel) { console.log('사용자가 취소하였습니다.'); } else if (response.error) { console.log('에러 : ', response.error); // 에러시에 alert 를 사용할지 추가 논의 필요 } else { - const uri = { uri: response.uri }; - console.log(response.uri); - props.groupingCreationMainStore.groupingBackgroundImageChanged({ - ...uri, - }); + console.log(response.uri, response.type, response.fileName); + props.groupingCreationMainStore.groupingBackgroundImageChanged( + response.uri, response.type, response.fileName, + ); } }); }; diff --git a/app/src/view/sign/signIn/SignIn.js b/app/src/view/sign/signIn/SignIn.js index 1fe111c..998f248 100644 --- a/app/src/view/sign/signIn/SignIn.js +++ b/app/src/view/sign/signIn/SignIn.js @@ -47,6 +47,7 @@ class SignIn extends React.Component { } async signInButtonClicked() { + console.log("clicked!"); await this.props.signInStore.signIn(); } diff --git a/app/src/view/sign/signUp/SignUpPhone.js b/app/src/view/sign/signUp/SignUpPhone.js index 300d8fc..359b5f3 100644 --- a/app/src/view/sign/signUp/SignUpPhone.js +++ b/app/src/view/sign/signUp/SignUpPhone.js @@ -87,8 +87,9 @@ const SignUpPhone = (props) => { // }); const signUpNextButtonClicked = async () => { - props.signUpPhoneStore.phoneCodeValidationSucceed.bind(this); - props.signUpPhoneStore.isAllCompleted ? signUpNextButtonClicked.bind(this) : null; + console.log("hi hello!"); + await props.signUpPhoneStore.phoneCodeValidationSucceed.bind(this); + await props.signUpPhoneStore.isAllCompleted ? signUpNextButtonClicked.bind(this) : null; await props.signUpPhoneStore.completePhoneNumber(); props.navigation.navigate('SignUpEmail'); }; diff --git a/ios/Podfile b/ios/Podfile index 22385b1..ce34e92 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -61,6 +61,7 @@ target 'Grouping' do pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' + target 'GroupingTests' do inherit! :search_paths # Pods for testing diff --git a/package.json b/package.json index 0b53441..67e6b27 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react-native-date-picker": "^3.2.2", "react-native-elements": "^2.0.0", "react-native-gesture-handler": "^1.6.1", - "react-native-image-picker": "^2.3.3", + "react-native-image-picker": "^3.1.4", "react-native-permissions": "2.2.0", "react-native-popup-menu": "^0.15.7", "react-native-reanimated": "^1.8.0",