diff --git a/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift b/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift index 0e3e7cbaf..60cb00400 100644 --- a/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift +++ b/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift @@ -242,10 +242,14 @@ final class MyInfoViewController: BaseReactorViewController, Edit .bind(to: reactor.action) .disposed(by: disposeBag) + myInfoView.rx.fruitStorageButtonDidTap + .do(onNext: { LogManager.analytics(MyInfoAnalyticsLog.clickFruitStorageButton) }) + .map { MyInfoReactor.Action.fruitNavigationDidTap } + .bind(to: reactor.action) + .disposed(by: disposeBag) + myInfoView.rx.drawButtonDidTap - .do(onNext: { - LogManager.analytics(MyInfoAnalyticsLog.clickFruitDrawEntryButton(location: .myPage)) - }) + .do(onNext: { LogManager.analytics(MyInfoAnalyticsLog.clickFruitDrawEntryButton(location: .myPage)) }) .map { MyInfoReactor.Action.drawButtonDidTap } .bind(to: reactor.action) .disposed(by: disposeBag) diff --git a/Projects/Features/MyInfoFeature/Sources/Views/FruitDrawButtonView.swift b/Projects/Features/MyInfoFeature/Sources/Views/FruitDrawButtonView.swift index 5ccba7882..83002867f 100644 --- a/Projects/Features/MyInfoFeature/Sources/Views/FruitDrawButtonView.swift +++ b/Projects/Features/MyInfoFeature/Sources/Views/FruitDrawButtonView.swift @@ -10,6 +10,7 @@ private protocol FruitDrawStateProtocol { } private protocol FruitDrawActionProtocol { + var fruitStorageButtonDidTap: Observable { get } var drawButtonDidTap: Observable { get } } @@ -40,6 +41,8 @@ final class FruitDrawButtonView: UIView { kernValue: -0.5 ) + let fruitStorageButton = UIButton() + let drawButton = UIButton().then { $0.titleLabel?.font = DesignSystemFontFamily.Pretendard.medium.font(size: 14) $0.setTitle("뽑기", for: .normal) @@ -66,6 +69,7 @@ extension FruitDrawButtonView { backgroundView, titleLabel, countLabel, + fruitStorageButton, drawButton ) } @@ -85,6 +89,12 @@ extension FruitDrawButtonView { $0.left.equalTo(titleLabel.snp.right).offset(8) } + fruitStorageButton.snp.makeConstraints { + $0.verticalEdges.equalTo(backgroundView.snp.verticalEdges) + $0.leading.equalTo(backgroundView.snp.leading) + $0.trailing.equalTo(drawButton.snp.leading) + } + drawButton.snp.makeConstraints { $0.verticalEdges.equalTo(backgroundView.snp.verticalEdges) $0.trailing.equalTo(backgroundView.snp.trailing) @@ -100,5 +110,6 @@ extension FruitDrawButtonView: FruitDrawStateProtocol { } extension Reactive: FruitDrawActionProtocol where Base: FruitDrawButtonView { + var fruitStorageButtonDidTap: Observable { base.fruitStorageButton.rx.tap.asObservable() } var drawButtonDidTap: Observable { base.drawButton.rx.tap.asObservable() } } diff --git a/Projects/Features/MyInfoFeature/Sources/Views/MyInfoView.swift b/Projects/Features/MyInfoFeature/Sources/Views/MyInfoView.swift index beba24a79..894c8874d 100644 --- a/Projects/Features/MyInfoFeature/Sources/Views/MyInfoView.swift +++ b/Projects/Features/MyInfoFeature/Sources/Views/MyInfoView.swift @@ -17,6 +17,7 @@ private protocol MyInfoActionProtocol { var scrollViewDidTap: Observable { get } var loginButtonDidTap: Observable { get } var profileImageDidTap: Observable { get } + var fruitStorageButtonDidTap: Observable { get } var drawButtonDidTap: Observable { get } var fruitNavigationButtonDidTap: Observable { get } var qnaNavigationButtonDidTap: Observable { get } @@ -204,6 +205,7 @@ extension Reactive: MyInfoActionProtocol where Base: MyInfoView { var loginButtonDidTap: Observable { base.loginWarningView.rx.loginButtonDidTap } var profileImageDidTap: Observable { base.profileView.rx.profileImageDidTap } + var fruitStorageButtonDidTap: Observable { base.fruitDrawButtonView.rx.fruitStorageButtonDidTap } var drawButtonDidTap: Observable { base.fruitDrawButtonView.rx.drawButtonDidTap } var fruitNavigationButtonDidTap: Observable { base.fruitNavigationButton.rx.tap.asObservable() } var qnaNavigationButtonDidTap: Observable { base.qnaNavigationButton.rx.tap.asObservable() }