-
Notifications
You must be signed in to change notification settings - Fork 0
칼로리 캘린더 기능 #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
칼로리 캘린더 기능 #123
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -139,7 +139,7 @@ const LoginScreen = ({navigation}: any) => { | |
| if (shouldOnboard || isNewUser) { | ||
| navigation.replace('KakaoOnboarding'); | ||
| } else { | ||
| navigation.replace('Main'); | ||
| navigation.replace('Main'); | ||
| } | ||
| } catch (error: any) { | ||
| console.error('❌ [카카오 로그인] 토큰 저장 실패:', error); | ||
|
|
@@ -268,7 +268,7 @@ const LoginScreen = ({navigation}: any) => { | |
| if (shouldOnboard || isNewUser) { | ||
| navigation.replace('KakaoOnboarding'); | ||
| } else { | ||
| navigation.replace('Main'); | ||
| navigation.replace('Main'); | ||
| } | ||
| } catch (error: any) { | ||
| console.error('카카오 로그인 처리 실패:', error); | ||
|
|
@@ -394,7 +394,7 @@ const LoginScreen = ({navigation}: any) => { | |
| try { | ||
| // openAuthSessionAsync는 앱 내부 브라우저를 엽니다 | ||
| result = await WebBrowser.openAuthSessionAsync( | ||
| loginUrl, | ||
| loginUrl, | ||
| deepLinkScheme | ||
| ); | ||
| } catch (browserError: any) { | ||
|
|
@@ -463,7 +463,7 @@ const LoginScreen = ({navigation}: any) => { | |
| if (shouldOnboard || isNewUser) { | ||
| navigation.replace('KakaoOnboarding'); | ||
| } else { | ||
| navigation.replace('Main'); | ||
| navigation.replace('Main'); | ||
| } | ||
| } catch (error: any) { | ||
| console.error('❌ [카카오 로그인] 토큰 저장 실패:', error); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 리뷰 코멘트:
이러한 사항을 고려해보면, 현재 제출된 코드 패치에는 문제가 있어 보입니다. 코드 패치가 개선될 필요가 있으므로, 즉각적으로 머지하기는 어렵습니다. |
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드 리뷰
오류 메시지 처리:
if문에서 높이나 목표 체중이 조건에 부합하지 않을 때newErrors객체에 오류 메시지를 적절히 추가하는 부분은 잘 되어 있습니다. 하지만, 이러한 오류 메시지를 사용자에게 어떻게 보여줄 것인지에 대한 구현이 코드에서 보이지 않습니다. 예를 들어,newErrors가 세팅되었다면, 해당 오류를 사용자에게 알릴 수 있는 UI 요소가 필요합니다.코드 정리:
+와-기호가 포함된 라인 수정은 여러 줄에 걸쳐 많습니다. 이러한 수정은 리뷰를 어렵게 할 수 있으므로, 가능한 한 관련된 변경 사항을 함께 묶어 적용하는 것이 좋습니다. 예를 들어, UI의 형식을 변경하는 부분은 하나의 커밋으로 묶고, 로직의 변화는 또 다른 커밋으로 분리하여 명확성을 높일 수 있습니다.API 호출 후 처리:
authAPI.submitOnboarding(onboardingData);호출 후 응답을 기다리면서 로딩 상태를 유지하는 것은 적절하지만, 이 API 통신에서 발생할 수 있는 오류를 처리하는 과정이 보이지 않습니다.try-catch문을 사용하여 오류를 처리하고, 사용자에게 유효한 오류 메시지를 보여주는 것이 바람직합니다.키보드 회피 처리:
KeyboardAvoidingView의behavior속성에 대한 설정이 잘 되어 있지만, 이 속성이 항상 올바른 값을 가지는지 테스트해야 합니다. 특히, iOS와 Android에서의 동작 차이를 확인해야 합니다.Accessibility: UI 구성 요소에 대한 접근성(Accessible) 관련 설정도 고려할 필요가 있습니다. 예를 들어,
TouchableOpacity요소에accessibilityLabel속성을 추가하여 보조기술 사용자에게 더 나은 경험을 제공할 수 있습니다.리팩토링 가능성: 코드가 반복되는 부분이 몇 군데 있습니다. 예를 들어, 성별, 건강 목표, 운동 일수를 선택하는 UI의 각 요소들은 매우 유사해 보입니다. 이를 기반으로 하나의 일반화된 컴포넌트를 만들 수 있습니다. 이로 인해 코드의 유지보수성이 높아지고 중복 코드가 줄어들 것입니다.
JavaScript 스타일:
style속성에 대한 책정이 일관되지 않습니다.style={}또는style={[ ]}와 같은 문법의 일관성을 유지하는 것이 좋습니다.결론적으로, 기능적인 부분에는 큰 문제가 없어 보이지만 오류 처리 및 사용자 경험에 대한 개선이 필요해 보입니다.