Skip to content

Conversation

@kimjeakwan
Copy link
Collaborator

@kimjeakwan kimjeakwan commented Feb 19, 2025

💡 개요

Mypage에 통신한 것을 적용하기위한 리펙토링을 했습니다.

📃 작업내용

Mypage에 통신한 것을 적용하기위한 리펙토링을 했습니다.

🔀 변경사항

Mypage , DemeritList,CleanPoint, PentlyPoint 등을 리펙토링했습니다.

🙋‍♂️ 질문사항

  • 개선할 점, 오타, 코드에 이산한 부분이 있다면 Comment 달아주세요.

🍴 사용방법

🎸 기타

Summary by CodeRabbit

  • 새로운 기능

    • 사용자 페이지 등 주요 화면에 개선된 네비게이션과 오류 알림 기능이 도입되었습니다.
    • 벌점, 청결 정보 등 사용자 정보에 "방 번호"가 추가되어 보다 풍부한 데이터를 제공합니다.
    • 새로운 상향/하향 아이콘 및 타이포그래피 옵션이 디자인에 반영되어 UI가 향상되었습니다.
  • 리팩토링

    • UI 상태 관리와 데이터 처리 방식이 간소화되어 보다 원활한 화면 전환과 사용자 경험을 제공합니다.

@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2025

Walkthrough

이번 PR은 여러 모듈 전반에 걸쳐 파라미터, 반환 타입, 데이터 모델과 UI 컴포저블의 선언을 업데이트합니다. 네비게이션 및 오류 처리를 위해 기존 단일 파라미터 대신 별도의 인수(navigationBack, onErrorToast)가 도입되었으며, API 및 데이터소스 관련 getUsers 함수의 반환형이 리스트에서 단일 응답으로 변경되었습니다. 또한, 데이터 모델에 roomNum 프로퍼티가 추가되고, 테마 및 벡터 드로어블 리소스가 보강되었습니다.

Changes

파일 경로 그룹 변경 요약
app/src/main/java/DMNavHost.kt, presentation/.../navigation/MyPageNavigation.kt, presentation/.../Screen/MyPage.kt 네비게이션 함수 및 컴포저블 파라미터 업데이트: 기존 파라미터를 분리하여 navigationBackonErrorToast 추가, 함수명 수정 등
data/.../auth/UsersAPi.kt, data/.../datasource/users/UsersDataSource.kt, data/.../datasource/users/UsersDataSourceImpl.kt getUsers 메서드 반환 타입을 List<UsersResponse>/Flow<List<UsersResponse>>에서 단일 UsersResponse/Flow<UsersResponse>로 변경
data/.../dto/myrank/response/MyRankResponse.kt, data/.../dto/rank/response/RankResponse.kt, data/.../dto/users/response/UsersResponse.kt DTO에 roomNum 프로퍼티 추가 및 toModel 함수 업데이트
data/.../repoistory/UsersRepositoryImpl.kt, domain/.../reopoistory/UsersRepository.kt, domain/.../usecase/Users/GetUsersUseCase.kt 리포지토리와 유스케이스의 getUsers 반환형을 리스트에서 단일 모델로 변경, 매핑 로직 수정
domain/.../model/myrank/response/MyRankResponseModel.kt, domain/.../model/rank/response/RankResponseModel.kt, domain/.../model/users/response/UsersResponseModel.kt 도메인 모델에 roomNum 프로퍼티 추가
presentation/.../Mypage/component/DemeritList.kt, .../MyClean.kt, .../MyDemeritList.kt, presentation/.../main/component/Rankingcomponent.kt 컴포저블 함수 리팩토링: 상태 기반 UI 및 새로운 컴포넌트(DemeritComponent, MyCleanComponent) 도입, 파라미터 변경
presentation/.../theme/DomaAndroidTheme.kt, presentation/.../theme/DomaTypography.kt 테마 업데이트: DoMaAndroidTheme에 typography 파라미터 추가, suitbold 폰트 복원
presentation/.../viewModel/users/UsersViewModel.kt, presentation/.../viewModel/users/uistate/UsersUiState.kt ViewModel 및 UI 상태 업데이트: 에러 처리 개선(예외 포함), 성공 상태가 단일 모델로 반환
presentation/src/main/res/drawable/down.xml, presentation/src/main/res/drawable/up.xml 새로운 벡터 드로어블(up, down 화살표) 추가

Sequence Diagram(s)

sequenceDiagram
    participant NC as NavController
    participant MP as MyPageRoute
    participant VM as UsersViewModel
    participant UC as GetUsersUseCase
    participant UI as MyPage UI

    NC->>MP: navigationToMyPage() 호출
    MP->>VM: hilt로 viewModel 초기화
    VM->>UC: getUsers(userId) 호출
    UC-->>VM: 단일 UsersResponseModel 반환 (Flow)
    VM->>MP: UsersUiState 업데이트 (Success/Fail)
    MP->>UI: UI 컴포저블 렌더링 (onErrorToast 포함)
Loading

Possibly related PRs

Suggested labels

1️⃣ Priority: High

Suggested reviewers

  • xx-lvr

Poem

나는 코드 숲을 뛰노는 작은 토끼 🐰
파라미터 하나씩 정리하며 발랄하게 춤추네,
에러도 부드럽게 스치며 사라지고,
roomNum의 비밀이 반짝이는 별처럼 빛나네,
네비게이션 길 따라 달리며
코드의 리듬에 맞춰 귀엽게 뛰어보자!
🥕✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (10)
data/src/main/java/repoistory/UsersRepositoryImpl.kt (1)

16-17: 메서드명과 반환 타입의 불일치에 주의하세요.
getUsers라는 복수 표현의 메서드명이 단일 UsersResponseModel을 반환하고 있습니다. 혼동을 줄이기 위해 메서드명을 getUser 등으로 변경하는 방안을 검토해 보세요.

presentation/src/main/java/view/Mypage/component/DemeritList.kt (1)

24-46: 사용자 상태 처리 로직 검토
DemeritList에서 when을 통해 UsersUiState를 구분하는 로직은 일관성이 있어 보입니다. 다만 Fail 상태에서 추가적인 UI 안내(오류 메시지 등)가 필요할 수 있으니, 사용자 경험을 고려해 보완을 검토해 보세요.

presentation/src/main/java/view/Mypage/component/MyDemeritList.kt (3)

10-10: 클릭 영역에 시각적 피드백 권장
.clickable 사용 시 사용자의 터치 반응을 명확히 전달하기 위해 Ripple 효과 등의 시각적 피드백을 고려하시면 좋습니다.


37-62: 로딩·빈 상태 UI 처리 제안
UsersUiState.LoadingUsersUiState.Empty 상태에 대한 UI가 비어 있습니다. 스켈레톤이나 플레이스홀더 등을 추가하여 사용자 경험을 개선할 수 있습니다.


65-130: 하드코딩된 텍스트 i18n 권장
UI 문자열(예: "나의 벌점 내역")이 그대로 하드코딩되어 있습니다. 향후 다국어 지원이나 유지보수를 위해 stringResource로 관리하는 방식을 권장드립니다.

적용 예시:

- text = "나의 벌점 내역",
+ text = stringResource(id = R.string.my_demerit_history),
presentation/src/main/java/view/Mypage/component/MyClean.kt (2)

30-54: Fail 상태의 UI 처리 고려
Fail 상태에서 토스트만 표시하고 별도의 UI는 제공되지 않습니다. 연결 이슈나 재시도 버튼 등 사용자 편의를 위한 보완이 필요할 수 있습니다.


56-225: 하드코딩된 문구·형식 분리 권장
“안녕하세요”, “남은 청소”, “벌점” 등 하드코딩된 문구가 많습니다. 유지보수성과 다국어 지원을 위해 stringResource 사용 또는 별도의 상수/리소스 관리가 필요할 수 있습니다.

presentation/src/main/java/view/main/component/Rankingcomponent.kt (3)

106-106: 하드코딩된 간격 값을 개선하세요.

하드코딩된 152.dp 값은 다양한 화면 크기에서 레이아웃 문제를 일으킬 수 있습니다. 화면 크기에 따라 동적으로 조정되는 방식으로 변경하는 것이 좋습니다.

다음과 같이 수정하는 것을 제안합니다:

-Spacer(modifier = Modifier.width(152.dp))
+Spacer(modifier = Modifier.weight(1f))

154-155: 새로 추가된 roomNum 필드가 UI에 표시되지 않습니다.

RankResponseModelroomNum 필드가 추가되었지만 현재 UI에서 활용되지 않고 있습니다. 사용자에게 유용한 정보라면 표시하는 것이 좋습니다.

roomNum 필드를 UI에 표시하는 방법에 대해 제안해드릴까요?


148-158: Preview 함수에 다양한 케이스를 추가하세요.

현재 Preview는 단일 케이스만 보여주고 있습니다. 다양한 순위와 점수를 가진 케이스를 추가하면 UI 검증에 도움이 될 것 같습니다.

다음과 같이 여러 케이스를 추가하는 것을 제안합니다:

 @Composable
 @Preview
-fun PreviewRankingComponent() {
+fun PreviewRankingComponentGallery() {
+    Column {
+        // 1등 케이스
+        RankingComponent(
+            data = RankResponseModel(
+                rank = 1,
+                name = "홍길동",
+                penaltyPoint = 0,
+                userId = UUID.randomUUID(),
+                roomNum = 1
+            )
+        )
+        Spacer(modifier = Modifier.height(8.dp))
+        // 중간 순위 케이스
+        RankingComponent(
+            data = RankResponseModel(
+                rank = 3,
+                name = "김재관",
+                penaltyPoint = 5,
+                userId = UUID.randomUUID(),
+                roomNum = 3
+            )
+        )
+        Spacer(modifier = Modifier.height(8.dp))
+        // 낮은 순위 케이스
+        RankingComponent(
+            data = RankResponseModel(
+                rank = 10,
+                name = "이순신",
+                penaltyPoint = 15,
+                userId = UUID.randomUUID(),
+                roomNum = 5
+            )
+        )
+    }
+}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f27ba0b and f8deea6.

📒 Files selected for processing (25)
  • app/src/main/java/DMNavHost.kt (1 hunks)
  • data/src/main/java/remote/api/auth/UsersAPi.kt (1 hunks)
  • data/src/main/java/remote/datasource/users/UsersDataSource.kt (1 hunks)
  • data/src/main/java/remote/datasource/users/UsersDataSourceImpl.kt (1 hunks)
  • data/src/main/java/remote/dto/myrank/response/MyRankResponse.kt (2 hunks)
  • data/src/main/java/remote/dto/rank/response/RankResponse.kt (1 hunks)
  • data/src/main/java/remote/dto/users/response/UsersResponse.kt (2 hunks)
  • data/src/main/java/repoistory/UsersRepositoryImpl.kt (1 hunks)
  • domain/src/main/java/model/myrank/response/MyRankResponseModel.kt (1 hunks)
  • domain/src/main/java/model/rank/response/RankResponseModel.kt (1 hunks)
  • domain/src/main/java/model/users/response/UsersResponseModel.kt (1 hunks)
  • domain/src/main/java/reopoistory/UsersRepository.kt (1 hunks)
  • domain/src/main/java/usecase/Users/GetUsersUseCase.kt (1 hunks)
  • presentation/src/main/java/view/Mypage/Screen/MyPage.kt (1 hunks)
  • presentation/src/main/java/view/Mypage/component/DemeritList.kt (1 hunks)
  • presentation/src/main/java/view/Mypage/component/MyClean.kt (1 hunks)
  • presentation/src/main/java/view/Mypage/component/MyDemeritList.kt (1 hunks)
  • presentation/src/main/java/view/Mypage/navigation/MyPageNavigation.kt (1 hunks)
  • presentation/src/main/java/view/main/component/Rankingcomponent.kt (1 hunks)
  • presentation/src/main/java/view/theme/DomaAndroidTheme.kt (1 hunks)
  • presentation/src/main/java/view/theme/DomaTypography.kt (1 hunks)
  • presentation/src/main/java/viewModel/users/UsersViewModel.kt (1 hunks)
  • presentation/src/main/java/viewModel/users/uistate/UsersUiState.kt (1 hunks)
  • presentation/src/main/res/drawable/down.xml (1 hunks)
  • presentation/src/main/res/drawable/up.xml (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • presentation/src/main/res/drawable/up.xml
  • presentation/src/main/res/drawable/down.xml
🔇 Additional comments (29)
presentation/src/main/java/view/Mypage/component/DemeritList.kt (2)

2-22: 새로 추가된 import 확인 권장
애니메이션 및 클릭 관련 API가 적절히 활용되고 있는지, 불필요한 import가 없는지 점검해 보세요. 필요한 기능이 모두 구현되어 있다면 문제 없습니다.


47-114: 컴포저블 분리로 가독성 향상
DemeritComponent는 확장/축소 애니메이션 처리와 텍스트 표시 로직이 잘 분리되어 있습니다. 상태(isExpanded)를 remember로 관리하는 패턴도 적절해 보이며, 디자인 요구사항과 맞는지 확인해 보세요.

presentation/src/main/java/view/Mypage/Screen/MyPage.kt (3)

3-29: 추가된 import와 DI 구문 점검
Hilt 및 Compose 관련 API, collectAsStateWithLifecycle를 사용할 때는 버전 호환성을 확인하는 것이 좋습니다. 구성요소 Activity로의 다운캐스팅이 안전하게 이뤄지는지도 함께 살펴보시기 바랍니다.


32-49: MyPageRoute 내 의존성 주입 로직
LocalContext로부터 ComponentActivity를 가져와 hiltViewModel을 주입하는 로직이 정상 작동하려면, 실제 환경에서 LocalContext.current가 항상 ComponentActivity 타입임이 보장되어야 합니다. 호환성이나 상황에 따라서는 예외가 발생할 수 있으므로 한 번 더 검토해 보세요.


51-114: UUID 생성과 State 관리 방식 검토
LaunchedEffect(Unit) 내부에서 UUID.randomUUID()가 생성되어 getUserCallBack에 전달되고 있습니다. 화면이 재구성될 때마다 새로운 UUID가 생성될 여지가 있으므로, 의도된 로직인지 확인해 보세요. 필요하다면 rememberSaveable 등을 사용해 재구성 시점에서도 값이 유지되도록 처리하는 방안을 모색할 수 있습니다.

presentation/src/main/java/view/Mypage/component/MyDemeritList.kt (2)

3-7: 임포트 구문 문제없음
해당 애니메이션 관련 임포트들은 적절하게 사용되고 있습니다.


134-148: 프리뷰 함수 유용성
프리뷰 함수를 통해 컴포넌트 단위로 빠르게 확인할 수 있어 좋습니다. 별다른 문제는 보이지 않습니다.

domain/src/main/java/model/rank/response/RankResponseModel.kt (1)

10-10: 신규 필드 추가 확인 완료
roomNum 필드가 새로 추가되어 데이터 구조가 확장되었습니다. 다른 계층에서 해당 필드를 올바르게 사용할 수 있도록 점검해 주세요.

data/src/main/java/remote/datasource/users/UsersDataSource.kt (1)

8-8: 반환 타입 변경이 적절해 보입니다.

API 응답 구조 변경에 맞춰 단일 사용자 응답을 반환하도록 수정된 것이 타당해 보입니다.

domain/src/main/java/reopoistory/UsersRepository.kt (1)

9-9: 도메인 계층의 반환 타입 변경이 일관성 있게 적용되었습니다.

데이터 소스 계층의 변경사항이 리포지토리 인터페이스에도 올바르게 반영되었습니다.

domain/src/main/java/model/myrank/response/MyRankResponseModel.kt (1)

11-11: roomNum 필드 추가가 적절합니다.

사용자 정보에 방 번호를 추가한 것이 모델의 완성도를 높여줍니다. 다만, 다음 사항들을 검토해 주시기 바랍니다:

  1. 방 번호의 유효 범위 검증이 필요할 수 있습니다.
  2. 방 번호가 필수 필드인지 검토가 필요합니다.
data/src/main/java/remote/api/auth/UsersAPi.kt (1)

10-12: API 응답 타입 변경이 엔드포인트와 일치합니다.

단일 사용자 프로필을 조회하는 /{user_id}/profile 엔드포인트의 특성에 맞게 반환 타입이 List<UsersResponse>에서 UsersResponse로 변경된 것이 적절합니다.

domain/src/main/java/model/users/response/UsersResponseModel.kt (1)

14-14: 사용자 모델에 방 번호 필드가 추가되었습니다!

roomNum 필드의 추가는 적절해 보입니다. 정수형 타입을 사용한 것도 방 번호를 표현하기에 적합합니다.

presentation/src/main/java/viewModel/users/uistate/UsersUiState.kt (2)

9-9: 단일 사용자 응답 모델로 변경되었습니다!

Success 상태가 리스트 대신 단일 UsersResponseModel을 사용하도록 변경되었습니다. 이는 마이페이지에서 현재 사용자의 정보만을 표시하는 목적에 더 적합합니다.


10-10: 예외 처리가 개선되었습니다!

Fail 상태가 예외 정보를 포함하도록 개선되었습니다. 이를 통해 더 자세한 오류 정보를 사용자에게 제공할 수 있습니다.

domain/src/main/java/usecase/Users/GetUsersUseCase.kt (1)

12-13: 단일 사용자 응답 스트림으로 변경되었습니다!

Flow<List<UsersResponseModel>>에서 Flow<UsersResponseModel>로의 변경은 UI 상태 변경사항과 일관성이 있으며, 구현이 깔끔합니다.

presentation/src/main/java/view/theme/DomaAndroidTheme.kt (2)

11-12: 테마 커스터마이징이 개선되었습니다!

타이포그래피 매개변수가 추가되어 테마의 유연성이 향상되었습니다. Material 3 가이드라인을 잘 따르고 있습니다.


15-15: 테마 적용 로직이 업데이트되었습니다!

content 호출 시 색상과 타이포그래피를 모두 전달하도록 수정되었습니다.

data/src/main/java/remote/datasource/users/UsersDataSourceImpl.kt (1)

14-17:

Details

✅ Verification successful

반환 타입 변경이 다른 컴포넌트에 미치는 영향을 확인하세요.

반환 타입이 Flow<List<UsersResponse>>에서 Flow<UsersResponse>로 변경되었습니다. 이 변경이 상위 레이어의 컴포넌트들에 미치는 영향을 확인해주세요.

다음 스크립트를 실행하여 UsersResponse 타입을 사용하는 모든 위치를 확인하세요:


🏁 Script executed:

#!/bin/bash
# Description: Find all usages of UsersResponse type
rg "UsersResponse" -A 3

Length of output: 8458


검증 결과: 반환 타입 변경 영향 없음

  • UsersDataSourceImpl.kt에서 getUsers 메서드가 이제 Flow<UsersResponse>를 반환하고 있으며, 이 변경사항은 상위 레이어의 컴포넌트(예, UsersRepositoryImplUsersAPi)에서 이미 UsersResponse 타입에 맞게 처리되고 있습니다.
  • 스크립트 결과를 통해, UsersResponse를 사용하는 다른 파일들에서도 별도의 수정 없이 변경 사항이 반영되어 있는 것을 확인했습니다.
  • 다만, 최종적으로 상위 레이어에서 이 반환 타입 변경에 따른 부작용이 없는지 다시 한 번 확인해주시면 좋겠습니다.
data/src/main/java/remote/dto/rank/response/RankResponse.kt (2)

14-14: 새로운 roomNum 필드가 잘 추가되었습니다.

데이터 클래스에 roomNum 필드가 적절하게 추가되었고, JSON 직렬화를 위한 어노테이션도 올바르게 적용되었습니다.


21-22: 모델 변환 함수가 올바르게 업데이트되었습니다.

toModel 함수에서 새로 추가된 roomNum 필드가 정상적으로 매핑되었습니다.

presentation/src/main/java/view/Mypage/navigation/MyPageNavigation.kt (2)

12-14: 함수 이름이 올바르게 수정되었습니다.

navGationToMyPage에서 navigationToMyPage로 함수 이름이 정확하게 수정되었습니다.


16-25: 오류 처리와 네비게이션 기능이 개선되었습니다.

MyScreen 함수에 오류 처리(onErrorToast)와 뒤로 가기 네비게이션(navigationBack) 파라미터가 추가되어 기능이 향상되었습니다.

data/src/main/java/remote/dto/myrank/response/MyRankResponse.kt (1)

14-14: roomNum 필드가 적절하게 추가되었습니다.

데이터 클래스와 모델 변환 함수에 roomNum 필드가 올바르게 추가되었습니다.

Also applies to: 25-26

data/src/main/java/remote/dto/users/response/UsersResponse.kt (2)

18-18: roomNum 필드가 적절하게 추가되었습니다.

@Json 어노테이션을 사용하여 JSON 직렬화가 올바르게 설정되었습니다.


29-30: toModel 함수가 새로운 roomNum 필드를 포함하도록 업데이트되었습니다.

모델 변환 로직이 일관성있게 유지되었습니다.

presentation/src/main/java/view/theme/DomaTypography.kt (1)

13-13: 볼드체 폰트가 FontFamily에 추가되었습니다.

suitbold 폰트의 추가로 타이포그래피 시스템이 더욱 완성도 있게 구성되었습니다.

presentation/src/main/java/viewModel/users/UsersViewModel.kt (2)

38-38: 오류 처리가 개선되었습니다.

예외 정보를 UsersUiState.Fail에 포함시켜 더 자세한 오류 정보를 제공할 수 있게 되었습니다.


42-42: 성공 상태 처리가 단순화되었습니다.

불필요한 빈 데이터 체크가 제거되어 코드가 더 간결해졌습니다.

import view.Mypage.Screen.MyPageRoute


const val MyPage_loute = "Mypage_loute"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

상수 이름의 오타를 수정해주세요.

MyPage_loute에 오타가 있습니다. MyPage_route로 수정하는 것이 좋겠습니다.

-const val MyPage_loute = "Mypage_loute"
+const val MyPage_route = "Mypage_route"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const val MyPage_loute = "Mypage_loute"
const val MyPage_route = "Mypage_route"

Comment on lines +28 to +31
MyScreen(
navigationBack = navController::popBackStack,
onErrorToast = { throwable, message ->}
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

MyScreen 컴포넌트의 매개변수가 개선되었습니다.

오류 처리를 위한 onErrorToast 콜백이 추가되어 사용자 경험이 향상되었습니다. 하지만 현재 구현에서는 콜백이 아무 동작도 수행하지 않습니다.

실제 오류 메시지를 표시하는 토스트 구현을 추가하는 것이 좋겠습니다. 예시 구현을 원하시나요?

Copy link
Collaborator

@xx-lvr xx-lvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다.

@kimjeakwan kimjeakwan merged commit 0a1e29a into develop Feb 19, 2025
2 checks passed
@kimjeakwan kimjeakwan deleted the feature/55-mypage-network branch February 19, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants