Skip to content

Commit 1e783f6

Browse files
committed
feat: 로딩 중인곳에서만 LoadingView가 뜨도록 개선
1 parent cb33de8 commit 1e783f6

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

DevLog/UI/Home/HomeView.swift

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ struct HomeView: View {
9393
.onAppear {
9494
viewModel.send(.onAppear)
9595
}
96-
.overlay {
97-
if viewModel.state.isLoading {
98-
LoadingView()
99-
}
100-
}
10196
}
10297
}
10398

@@ -144,11 +139,15 @@ struct HomeView: View {
144139
private var pinnedSection: some View {
145140
Section(content: {
146141
if viewModel.state.pinnedTodos.isEmpty {
147-
HStack {
148-
Spacer()
149-
Text("최근에 중요 표시를 한 Todo가 여기 표시됩니다.")
150-
.font(.callout)
151-
Spacer()
142+
if viewModel.state.isLoading {
143+
LoadingView()
144+
} else {
145+
HStack {
146+
Spacer()
147+
Text("최근에 중요 표시를 한 Todo가 여기 표시됩니다.")
148+
.font(.callout)
149+
Spacer()
150+
}
152151
}
153152
} else {
154153
ForEach(viewModel.state.pinnedTodos, id: \.id) { todo in

0 commit comments

Comments
 (0)