Skip to content

[feat/#338] 내가 등록한 장소 UI 구현 및 api 연결#351

Merged
seojoozero merged 9 commits intodevelopfrom
feat/#338-mypage-myplace
Nov 26, 2025
Merged

[feat/#338] 내가 등록한 장소 UI 구현 및 api 연결#351
seojoozero merged 9 commits intodevelopfrom
feat/#338-mypage-myplace

Conversation

@seojoozero
Copy link
Copy Markdown
Contributor

📄 작업 내용

  • 마이페이지의 내가 등록한 장소 뷰 구현했습니다.
  • api 연결까지 했습니다.
구현 내용 iPhone 13 mini iPhone 16 pro
내가 등록한 장소 뷰

🔗 연결된 이슈

@seojoozero seojoozero requested a review from a team November 26, 2025 16:38
@seojoozero seojoozero self-assigned this Nov 26, 2025
@seojoozero seojoozero linked an issue Nov 26, 2025 that may be closed by this pull request
1 task
@seojoozero seojoozero added 🐰 jooyoung 주영이가함! 🛠️ feat 새로운 기능 구현 시 사용 labels Nov 26, 2025
Copy link
Copy Markdown
Collaborator

@SeungWon1125 SeungWon1125 left a comment

Choose a reason for hiding this comment

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

생일선물 감사함니다 호호


사용자가 등록한 장소 조회 API 무한스크롤 기본값을 지금 상황에서는 View에서 Action 호출할 때 설정해주는 방식은 어떤가요? 나중에 수정할 때 덜 번거로울 거 같은데, 사실 지금 상황에서는 크게 중요한 건 아니라 넘어가도 괜찮~

.onAppear {
    store.dispatch(.fetchRegisteredPlaces(userId: userId, page: 0, size: 100))
}

Comment on lines +24 to +50
func fetchRegisteredPlaces(
userId: Int,
page: Int = 0,
size: Int = 100
) async -> RegisteredPlacesAction {
do {
let response = try await userService.fetchRegisteredPlaces(
userId: userId,
page: page,
size: size
)

guard let data = response.data else {
return .fetchRegisteredPlacesFailed(error: .responseError)
}

let places = data.content.map { RegisteredPlace(dto: $0) }

return .registeredPlacesFetched(places)

} catch let error as NetworkError {
return .fetchRegisteredPlacesFailed(error: error)
} catch {
return .fetchRegisteredPlacesFailed(error: .unknownError)
}
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

깔끔하네요

import Foundation

enum RegisteredPlacesAction {
case fetchRegisteredPlaces(userId: Int, page: Int = 0, size: Int = 100)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Effect에서 함수 인자에 기본값이 있어서 여기는 설정 안 해도 괜찮아 보입니다~!

Task {
let results = await effect.fetchRegisteredPlaces(userId: userId)
self.dispatch(results)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

보니까 여기서 pagesize를 아에 안 쓰네요 나중에 수정해야할 때 번거로울 수 있으니 여기서는 userId, page, size 다 넘겨서 사용하는 거로 하고, .fetchRegisteredPlaces 호출하는 곳에서 page = 0size = 100 넣어주는 건 어떤가요?

그럼 Effect에서 기본값 설정 안 해줘도 될 거 같은데

Copy link
Copy Markdown
Contributor

@dudwntjs dudwntjs left a comment

Choose a reason for hiding this comment

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

_

엘지티엠✨


// MARK: - Properties

@EnvironmentObject private var appState: AppState
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이 친구는 어디서 쓰이고 있는 거조??! 필요없으면 지워도 댈 것 같아유

state.registeredPlaces = places
case .fetchRegisteredPlacesFailed(let error):
state.error = error
print(error)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

reducer는 순수 함수니깐용 이거 지우는 거 어떨까유 헷

Copy link
Copy Markdown
Contributor

@dudwntjs dudwntjs left a comment

Choose a reason for hiding this comment

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

image

@seojoozero seojoozero merged commit 09b1a9f into develop Nov 26, 2025
@seojoozero seojoozero deleted the feat/#338-mypage-myplace branch November 26, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ feat 새로운 기능 구현 시 사용 🐰 jooyoung 주영이가함!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 내가 등록한 장소 뷰 구현

3 participants