Skip to content
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

[TNT-195] 트레이니 홈, 식단 확인 화면 API 연결 #88

Merged
merged 7 commits into from
Feb 14, 2025

Conversation

FpRaArNkK
Copy link
Contributor

📌 What is the PR?

  • 트레이니 홈 화면과 식단 확인 화면의 API, 연결 흐름을 작성했습니다.

🪄 Changes

  • Trainee 관련 API 최신화
  • 트레이니 홈 화면 API 작성
  • 트레이니 식단 확인 화면 API 작성

🌐 Common Changes

  • TCalendarView 내부의 selectedDate 바인딩 변수에 변경되었을 때만 setter 호출하도록 수정했습니다.

🔥 PR Point

  • 홈화면의 캘린더 관련 데이터 로드에서 단순 캐싱 로직을 사용했습니다.
  1. 한달 +- 1주를 엑스트라로 한번에 받고, 이를 배열에 한달치로 저장합니다.
  2. 이때 해당 달을 로드된 달 Set에 추가하며, 이후로 API를 호출할 때 해당 집합에 존재하는 경우 API를 호출하지 않아 불필요한 API 콜을 막습니다.

📸 Screenshot

기능 스크린샷
GIF

🙆🏻 To Reviewers

  • API 완!

💭 Related Issues

@FpRaArNkK FpRaArNkK added the ✨Feat 새로운 기능 구현 (새로운 로직 추가, UI 구현 등) label Feb 13, 2025
@FpRaArNkK FpRaArNkK requested a review from syss220211 February 13, 2025 20:35
@FpRaArNkK FpRaArNkK self-assigned this Feb 13, 2025
Copy link
Member

@syss220211 syss220211 left a comment

Choose a reason for hiding this comment

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

고생하셨어요!!

Comment on lines +46 to +50
currentPage: Binding(get: {
currentPage
}, set: {
if $0 != currentPage { currentPage = $0 }
}),
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻

Comment on lines +275 to +276
guard !state.loadedMonths.contains(newMonth) else { return .none }
state.loadedMonths.insert(newMonth)
Copy link
Member

Choose a reason for hiding this comment

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

월간도 이런식으로 진행해놓겠습니다..

@FpRaArNkK FpRaArNkK merged commit 6dd9995 into develop Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feat 새로운 기능 구현 (새로운 로직 추가, UI 구현 등)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TNT-195] 트레이니 홈, 식단 확인 화면 API 연결
2 participants