Skip to content

Commit 8dc10fb

Browse files
committed
refactor: show(_:) -> replace(with:)로 수정
1 parent 9088383 commit 8dc10fb

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

DevLog/UI/Common/NavigationRouter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class NavigationRouter<Route: Hashable> {
2828
}
2929
}
3030

31-
func show(_ route: Route) {
31+
func replace(with route: Route) {
3232
path = [route]
3333
}
3434

DevLog/UI/Home/HomeView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ struct HomeView: View {
250250
}
251251
} else {
252252
Button {
253-
coordinator.router.show(.category(item))
253+
coordinator.router.replace(with: .category(item))
254254
} label: {
255255
labelImage(
256256
text: item.localizedName,
@@ -270,7 +270,7 @@ struct HomeView: View {
270270
}
271271
} else {
272272
Button {
273-
coordinator.router.show(.todo(TodoIdItem(id: item.id)))
273+
coordinator.router.replace(with: .todo(TodoIdItem(id: item.id)))
274274
} label: {
275275
RecentTodoRow(todo: item)
276276
.frame(maxWidth: .infinity, alignment: .leading)
@@ -288,7 +288,7 @@ struct HomeView: View {
288288
}
289289
} else {
290290
Button {
291-
coordinator.router.show(.webPage(item))
291+
coordinator.router.replace(with: .webPage(item))
292292
} label: {
293293
WebItemRow(item: item, showsChevron: false)
294294
.frame(maxWidth: .infinity, alignment: .leading)

DevLog/UI/Today/TodayView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct TodayView: View {
166166
}
167167
} else {
168168
Button {
169-
router.show(.todo(TodoIdItem(id: item.id)))
169+
router.replace(with: .todo(TodoIdItem(id: item.id)))
170170
} label: {
171171
TodayTodoRow(item: item)
172172
.frame(maxWidth: .infinity, alignment: .leading)

0 commit comments

Comments
 (0)