From 0c755334eda8c5208bfaef75f90ee252b3460d03 Mon Sep 17 00:00:00 2001 From: leemhyungyu Date: Wed, 14 Aug 2024 00:35:28 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EC=9E=90=EA=B8=B0=EC=86=8C?= =?UTF-8?q?=EA=B0=9C=20=EC=9E=91=EC=84=B1=20=ED=9B=84=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interface/Sources/MyPage/MyPageFeature.swift | 10 ++++++++-- .../Sources/MyPage/MyPageFeatureInterface.swift | 4 ++-- .../MyPage/Interface/Sources/MyPage/MyPageView.swift | 4 ++-- .../Interface/Sources/Root/SandBeachRootFeature.swift | 3 ++- .../Sources/SandBeach/SandBeachFeatureInterface.swift | 2 +- .../Feature/Sources/TabView/MainTabViewFeature.swift | 2 ++ 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeature.swift b/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeature.swift index 6c6ff70c..b8607625 100644 --- a/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeature.swift +++ b/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeature.swift @@ -22,7 +22,7 @@ extension MyPageFeature { @Dependency(\.profileClient) var profileClient let reducer = Reduce { state, action in switch action { - case .onAppear: + case .onLoad: state.isShowLoadingProgressView = true return .run { send in let userProfile = try await profileClient.fetchUserProfile() @@ -102,7 +102,13 @@ extension MyPageFeature { return .none case let .selectedTabDidChanged(selectedTap): return .send(.delegate(.selectedTabDidChanged(selectedTap))) - case .binding, .delegate, .destination, .alert: + + case .userProfileUpdateDidRequest: + return .run { send in + let userProfile = try await profileClient.fetchUserProfile() + await send(.userProfileDidFetched(userProfile)) + } + default: return .none } } diff --git a/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeatureInterface.swift b/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeatureInterface.swift index 3a1b6727..f86a277a 100644 --- a/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeatureInterface.swift +++ b/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeatureInterface.swift @@ -42,9 +42,9 @@ public struct MyPageFeature { public enum Action: BindableAction { // View Life Cycle - case onAppear + case onLoad case userProfileDidFetched(UserProfile) - + case userProfileUpdateDidRequest case logOutButtonDidTapped case logOutDidCompleted case withdrawalButtonDidTapped diff --git a/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageView.swift b/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageView.swift index 97d8e9f6..2d3484ac 100644 --- a/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageView.swift +++ b/Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageView.swift @@ -45,8 +45,8 @@ public struct MyPageView: View { .setTabBar(selectedTab: .myPage) { selectedTab in store.send(.selectedTabDidChanged(selectedTab)) } - .onAppear { - store.send(.onAppear) + .onLoad { + store.send(.onLoad) } .overlay { if store.isShowLoadingProgressView { diff --git a/Projects/Feature/SandBeach/Interface/Sources/Root/SandBeachRootFeature.swift b/Projects/Feature/SandBeach/Interface/Sources/Root/SandBeachRootFeature.swift index 430fdc46..e86dfcd9 100644 --- a/Projects/Feature/SandBeach/Interface/Sources/Root/SandBeachRootFeature.swift +++ b/Projects/Feature/SandBeach/Interface/Sources/Root/SandBeachRootFeature.swift @@ -61,6 +61,7 @@ public struct SandBeachRootFeature { public enum Delegate { case goToBottleStorageRequest case selectedTabDidChanged(selectedTab: TabType) + case profileSetUpDidCompleted } } @@ -142,7 +143,7 @@ extension SandBeachRootFeature { case .profileSetupDidCompleted: state.path.removeAll() - return .none + return .send(.delegate(.profileSetUpDidCompleted)) case let .selectedTabDidChanged(selectedTab): return .send(.delegate(.selectedTabDidChanged(selectedTab: selectedTab))) diff --git a/Projects/Feature/SandBeach/Interface/Sources/SandBeach/SandBeachFeatureInterface.swift b/Projects/Feature/SandBeach/Interface/Sources/SandBeach/SandBeachFeatureInterface.swift index aea2f433..448b73f8 100644 --- a/Projects/Feature/SandBeach/Interface/Sources/SandBeach/SandBeachFeatureInterface.swift +++ b/Projects/Feature/SandBeach/Interface/Sources/SandBeach/SandBeachFeatureInterface.swift @@ -108,7 +108,7 @@ extension SandBeachFeature { } case let .userStateFetchCompleted(userState, isDisableButton): - state.userState = .noIntroduction + state.userState = userState state.isDisableIslandBottle = isDisableButton state.isLoading = false return .none diff --git a/Projects/Feature/Sources/TabView/MainTabViewFeature.swift b/Projects/Feature/Sources/TabView/MainTabViewFeature.swift index b6f7152c..cef1b711 100644 --- a/Projects/Feature/Sources/TabView/MainTabViewFeature.swift +++ b/Projects/Feature/Sources/TabView/MainTabViewFeature.swift @@ -81,6 +81,8 @@ public struct MainTabViewFeature { state.selectedTab = .bottleStorage case let .selectedTabDidChanged(selectedTab): state.selectedTab = selectedTab + case .profileSetUpDidCompleted: + return .send(.myPage(.userProfileUpdateDidRequest)) } return .none From 2d07d76cbd84a80d668dd3fe7641c75bcb028720 Mon Sep 17 00:00:00 2001 From: leemhyungyu Date: Wed, 14 Aug 2024 00:39:20 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20TabBar=20=EC=83=81=EB=8B=A8=20?= =?UTF-8?q?=EB=AA=A8=EC=84=9C=EB=A6=AC=EB=A7=8C=20cornerRadius?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/Feature/TabBar/Interface/Sources/TabBarModifier.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Projects/Feature/TabBar/Interface/Sources/TabBarModifier.swift b/Projects/Feature/TabBar/Interface/Sources/TabBarModifier.swift index 609cea06..0c151aa6 100644 --- a/Projects/Feature/TabBar/Interface/Sources/TabBarModifier.swift +++ b/Projects/Feature/TabBar/Interface/Sources/TabBarModifier.swift @@ -52,8 +52,9 @@ private struct TabBarModifier: ViewModifier { // TODO: - DesignSystem -> 디자인들 Contants 관리 .frame(height: 106) .background { - RoundedRectangle(cornerRadius: BottleRadiusType.xl.value) + RoundedRectangle(cornerRadius: 0) .fill(ColorToken.background(.secondary).color) + .cornerRadius(.xl, corenrs: [.topLeft, .topRight]) } } }