Skip to content

Commit 9088383

Browse files
committed
refactor: NavigationRouter 의존성 제거
1 parent a9a0e74 commit 9088383

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

DevLog/UI/Home/HomeView.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import SwiftUI
99

1010
struct HomeView: View {
11-
@Environment(NavigationRouter<HomeRoute>.self) private var router
1211
@ScaledMetric(relativeTo: .largeTitle) private var labelWidth = CGFloat(34)
1312
let coordinator: HomeViewCoordinator
1413
let isCompactLayout: Bool
@@ -251,7 +250,7 @@ struct HomeView: View {
251250
}
252251
} else {
253252
Button {
254-
router.show(.category(item))
253+
coordinator.router.show(.category(item))
255254
} label: {
256255
labelImage(
257256
text: item.localizedName,
@@ -271,7 +270,7 @@ struct HomeView: View {
271270
}
272271
} else {
273272
Button {
274-
router.show(.todo(TodoIdItem(id: item.id)))
273+
coordinator.router.show(.todo(TodoIdItem(id: item.id)))
275274
} label: {
276275
RecentTodoRow(todo: item)
277276
.frame(maxWidth: .infinity, alignment: .leading)
@@ -289,7 +288,7 @@ struct HomeView: View {
289288
}
290289
} else {
291290
Button {
292-
router.show(.webPage(item))
291+
coordinator.router.show(.webPage(item))
293292
} label: {
294293
WebItemRow(item: item, showsChevron: false)
295294
.frame(maxWidth: .infinity, alignment: .leading)

0 commit comments

Comments
 (0)