diff --git a/Projects/Feature/Home/Sources/Goal/AddGoalListView.swift b/Projects/Feature/Home/Sources/Goal/AddGoalListView.swift
index 117ea967..05484ae2 100644
--- a/Projects/Feature/Home/Sources/Goal/AddGoalListView.swift
+++ b/Projects/Feature/Home/Sources/Goal/AddGoalListView.swift
@@ -26,9 +26,6 @@ struct AddGoalListView: View {
headerView
.padding(.horizontal, 20)
categoryListView
- .padding(.top, 20)
- .padding(.horizontal, 20)
- .padding(.bottom, 80)
}
.padding(.top, 28)
}
@@ -54,10 +51,15 @@ private extension AddGoalListView {
}
var categoryListView: some View {
- VStack(spacing: 16) {
- ForEach(items, id: \.self) { item in
- categoryCardView(for: item)
+ ScrollView {
+ VStack(spacing: 16) {
+ ForEach(items, id: \.self) { item in
+ categoryCardView(for: item)
+ }
}
+ .padding(.top, 20)
+ .padding(.bottom, 80)
+ .padding(.horizontal, 20)
}
}
diff --git a/Projects/Feature/Home/Sources/Home/HomeReducer+Impl.swift b/Projects/Feature/Home/Sources/Home/HomeReducer+Impl.swift
index 245f2633..3c28625e 100644
--- a/Projects/Feature/Home/Sources/Home/HomeReducer+Impl.swift
+++ b/Projects/Feature/Home/Sources/Home/HomeReducer+Impl.swift
@@ -218,10 +218,10 @@ extension HomeReducer {
case let .myCardTapped(card):
let verificationDate = TXCalendarUtil.apiDateString(for: state.calendarDate)
return .send(.delegate(.goToGoalDetail(id: card.id, owner: .mySelf, verificationDate: verificationDate)))
-
+
case let .headerTapped(card):
return .send(.delegate(.goToStatsDetail(id: card.id)))
-
+
case .floatingButtonTapped:
state.isAddGoalPresented = true
return .none
@@ -267,24 +267,31 @@ extension HomeReducer {
state.cards = items
}
return .none
-
+
case .fetchGoalsFailed:
state.isLoading = false
return .send(.showToast(.warning(message: "목표 조회에 실패했어요")))
case let .setCalendarDate(date):
- let now = state.nowDate
- if date == state.calendarDate {
- return .none
- }
+ guard date != state.calendarDate else { return .none }
+
+ let today = TXCalendarDate()
+ let calendar = Calendar(identifier: .gregorian)
+
state.calendarDate = date
state.calendarMonthTitle = "\(date.month)월 \(date.year)"
state.calendarWeeks = TXCalendarDataGenerator.generateWeekData(for: date)
- state.isRefreshHidden = (
- date.year == now.year &&
- date.month == now.month &&
- date.day == now.day
- )
+
+ if let selectedDate = date.date,
+ let todayDate = today.date {
+ let isThisWeek = calendar.isDate(
+ selectedDate,
+ equalTo: todayDate,
+ toGranularity: .weekOfYear
+ )
+ state.isRefreshHidden = isThisWeek
+ }
+
state.isLoading = true
return .send(.fetchGoals)
diff --git a/Projects/Feature/Home/Sources/Home/HomeView.swift b/Projects/Feature/Home/Sources/Home/HomeView.swift
index 4462dcd8..3e841de3 100644
--- a/Projects/Feature/Home/Sources/Home/HomeView.swift
+++ b/Projects/Feature/Home/Sources/Home/HomeView.swift
@@ -49,15 +49,23 @@ public struct HomeView: View {
headerRow
.padding(.horizontal, 20)
.padding(.top, 16)
- goalEmptyView
}
- Spacer()
}
+ .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
.overlay {
if store.isLoading {
ProgressView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
+
+ if !store.hasCards {
+ goalEmptyView
+ }
+ }
+ .overlay(alignment: .bottomTrailing) {
+ if !store.hasCards {
+ emptyArrow
+ }
}
.onAppear {
store.send(.onAppear)
@@ -106,7 +114,6 @@ public struct HomeView: View {
isPresented: $store.isCameraPermissionAlertPresented,
onDismiss: { store.send(.cameraPermissionAlertDismissed) }
)
- .frame(alignment: .center)
.toolbar(.hidden, for: .navigationBar)
}
}
@@ -132,6 +139,9 @@ private extension HomeView {
TXCalendar(
mode: .weekly,
weeks: store.calendarWeeks,
+ config: .init(
+ dateStyle: .init(lastDateTextColor: Color.Gray.gray500)
+ ),
onSelect: { item in
store.send(.calendarDateSelected(item))
},
@@ -212,25 +222,28 @@ private extension HomeView {
}
var goalEmptyView: some View {
- GeometryReader { geometry in
- VStack(alignment: .center, spacing: 0) {
- Image.Illustration.emptyPoke
-
- Text("첫 목표를 세워볼까요?")
- .typography(.t2_16b)
- .foregroundStyle(Color.Gray.gray400)
-
- Text("+ 버튼을 눌러 목표를 추가해보세요")
- .typography(.c1_12r)
- .foregroundStyle(Color.Gray.gray300)
- .padding(.top, 5)
- }
- .frame(width: geometry.size.width, height: geometry.size.height)
- .overlay(alignment: .bottomTrailing) {
- Image.Illustration.arrow
- .padding(.bottom, 63)
- .padding(.trailing, 86)
- }
+ VStack(spacing: 0) {
+ Image.Illustration.emptyPoke
+ .frame(height: 116)
+
+ Text("첫 목표를 세워볼까요?")
+ .typography(.t2_16b)
+ .foregroundStyle(Color.Gray.gray400)
+ .padding(.top, 16)
+
+ Text("+ 버튼을 눌러 목표를 추가해보세요")
+ .typography(.c1_12r)
+ .foregroundStyle(Color.Gray.gray300)
+ .padding(.top, 4)
}
+ .frame(maxWidth: .infinity, maxHeight: .infinity)
+ .ignoresSafeArea()
+ }
+
+ var emptyArrow: some View {
+ Image.Illustration.arrow
+ .padding(.bottom, 71)
+ .padding(.trailing, 86)
+ .ignoresSafeArea()
}
}
diff --git a/Projects/Feature/MainTab/Sources/View/MainTabView.swift b/Projects/Feature/MainTab/Sources/View/MainTabView.swift
index 97791066..3d352a96 100644
--- a/Projects/Feature/MainTab/Sources/View/MainTabView.swift
+++ b/Projects/Feature/MainTab/Sources/View/MainTabView.swift
@@ -74,7 +74,7 @@ private extension MainTabView {
TXCircleButton(config: .plus()) {
store.send(.home(.home(.floatingButtonTapped)))
}
- .insideBorder(
+ .outsideBorder(
Color.Gray.gray300,
shape: .circle,
lineWidth: LineWidth.m
diff --git a/Projects/Feature/MakeGoal/Sources/MakeGoalView.swift b/Projects/Feature/MakeGoal/Sources/MakeGoalView.swift
index 219c3965..93fe2afc 100644
--- a/Projects/Feature/MakeGoal/Sources/MakeGoalView.swift
+++ b/Projects/Feature/MakeGoal/Sources/MakeGoalView.swift
@@ -273,7 +273,7 @@ private extension MakeGoalView {
.padding(.vertical, 8)
}
.padding(.top, 36)
- .padding(.bottom, TXSafeArea.inset(.bottom) + 16)
+ .padding(.bottom, 16)
}
var periodTabButtons: some View {
diff --git a/Projects/Feature/Onboarding/Sources/Connect/OnboardingConnectView.swift b/Projects/Feature/Onboarding/Sources/Connect/OnboardingConnectView.swift
index aa73b3b1..6cc31234 100644
--- a/Projects/Feature/Onboarding/Sources/Connect/OnboardingConnectView.swift
+++ b/Projects/Feature/Onboarding/Sources/Connect/OnboardingConnectView.swift
@@ -242,7 +242,7 @@ private extension OnboardingConnectView {
.padding(.horizontal, 30)
}
.padding(.top, 28)
- .padding(.bottom, TXSafeArea.inset(.bottom) + Spacing.spacing7)
+ .padding(.bottom, Spacing.spacing7)
}
func bulletItem(_ text: String) -> some View {
diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/doubt.imageset/doubt.svg b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/doubt.imageset/doubt.svg
index 5c5744cc..3217fb89 100644
--- a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/doubt.imageset/doubt.svg
+++ b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/doubt.imageset/doubt.svg
@@ -1,26 +1,17 @@
diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/fuck.imageset/fuck.svg b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/fuck.imageset/fuck.svg
index 3a73026d..c4e104a7 100644
--- a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/fuck.imageset/fuck.svg
+++ b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/fuck.imageset/fuck.svg
@@ -1,29 +1,29 @@
diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/happy.imageset/happy.svg b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/happy.imageset/happy.svg
index 87105ec8..d8b95744 100644
--- a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/happy.imageset/happy.svg
+++ b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/happy.imageset/happy.svg
@@ -1,21 +1,22 @@
diff --git a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_clean.imageset/icon_clean.svg b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_clean.imageset/icon_clean.svg
index 5b0a8edb..6c5abe8a 100644
--- a/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_clean.imageset/icon_clean.svg
+++ b/Projects/Shared/DesignSystem/Resources/Image/ImageAssets.xcassets/Icons/Illustration/icon_clean.imageset/icon_clean.svg
@@ -1,22 +1,22 @@