Skip to content

Commit

Permalink
๐ŸŒฑ :: ๋ฉด์ ‘ ํ›„๊ธฐ ์ถ”๊ฐ€ ์‹œ pop ์ฒ˜๋ฆฌ
Browse files Browse the repository at this point in the history
  • Loading branch information
ray3238 committed Jun 20, 2024
1 parent afbd0d8 commit f068691
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions Projects/Core/Sources/Steps/WritableReviewStep.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import RxFlow
public enum WritableReviewStep: Step {
case writableReviewIsRequired
case addReviewIsRequired
case popToMyPage
}
8 changes: 8 additions & 0 deletions Projects/Flow/Sources/MyPage/Review/WritableReviewFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public final class WritableReviewFlow: Flow {

case .addReviewIsRequired:
return navigateToAddReview()

case .popToMyPage:
return popToMyPage()
}
}
}
Expand Down Expand Up @@ -65,4 +68,9 @@ private extension WritableReviewFlow {
)
))
}

func popToMyPage() -> FlowContributors {
self.rootViewController.navigationController?.popViewController(animated: true)
return .none
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public final class WritableReviewViewModel: BaseViewModel, Stepper {
.subscribe()
.disposed(by: disposeBag)

input.writableReviewButtonDidTap.asObservable()
.map { _ in WritableReviewStep.popToMyPage }
.bind(to: steps)
.disposed(by: disposeBag)

return Output(
interviewReviewInfoList: interviewReviewInfoList,
qnaInfoList: self.qnaInfoList
Expand Down

0 comments on commit f068691

Please sign in to comment.