-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from dypark26/feature/fix-screen-area
fix: 가리는 스크린 없게 고침
- Loading branch information
Showing
11 changed files
with
191 additions
and
7,873 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { signInWithEmailAndPassword } from 'firebase/auth'; | ||
import { Keyboard } from 'react-native'; | ||
import { useMutation } from 'react-query'; | ||
import { auth } from '../shared/firebase'; | ||
|
||
export const SignIn = async (payload) => { | ||
const { email, password } = payload; | ||
Keyboard.dismiss(); // 버튼 클릭 시 키보드 접기 | ||
return signInWithEmailAndPassword(auth, email, password); | ||
}; | ||
export const useSignIn = () => { | ||
return useMutation(SignIn, { | ||
onError: (error) => { | ||
if (error.message.includes('user-not-found')) { | ||
alert('회원이 아닙니다. 회원가입을 먼저 진행해 주세요.'); | ||
} //비밀번호가 틀리면 아래 alert출력 | ||
if (error.message.includes('wrong-password')) { | ||
alert('비밀번호가 틀렸습니다.'); | ||
} | ||
}, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { StyleSheet, SafeAreaView } from 'react-native'; | ||
|
||
const PageContainer = ({ children }) => { | ||
return <SafeAreaView style={styles.screenArea}>{children}</SafeAreaView>; | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
screenArea: { | ||
...Platform.select({ | ||
ios: { | ||
flex: 1, | ||
backgroundColor: 'white', | ||
}, | ||
android: { | ||
flex: 1, | ||
paddingTop: 30, | ||
backgroundColor: 'white', | ||
}, | ||
}), | ||
}, | ||
}); | ||
|
||
export default PageContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.