@@ -45,11 +45,11 @@ struct MainView: View {
4545 }
4646 }
4747 . onAppear {
48- coordinator. mainViewModel . send ( . onAppear)
48+ coordinator. viewModel . send ( . onAppear)
4949 }
5050 . onChange ( of: selectedTab, initial: true ) { _, newValue in
5151 guard let newValue else { return }
52- coordinator. mainViewModel . send ( . selectedTabChanged( newValue) )
52+ coordinator. viewModel . send ( . selectedTabChanged( newValue) )
5353 if newValue == . home {
5454 homeViewCoordinator. fetchData ( )
5555 } else if newValue == . today {
@@ -61,12 +61,12 @@ struct MainView: View {
6161 }
6262 }
6363 . alert (
64- coordinator. mainViewModel . state. alertTitle,
64+ coordinator. viewModel . state. alertTitle,
6565 isPresented: mainAlertPresented
6666 ) {
6767 Button ( String ( localized: " common_close " ) , role: . cancel) { }
6868 } message: {
69- Text ( coordinator. mainViewModel . state. alertMessage)
69+ Text ( coordinator. viewModel . state. alertMessage)
7070 }
7171 }
7272
@@ -88,7 +88,7 @@ struct MainView: View {
8888 . tabItem {
8989 tabLabel ( . notification)
9090 }
91- . badge ( coordinator. mainViewModel . state. unreadPushCount)
91+ . badge ( coordinator. viewModel . state. unreadPushCount)
9292 . tag ( MainTab . notification as MainTab ? )
9393
9494 profileView
@@ -191,7 +191,7 @@ struct MainView: View {
191191 private func sidebarRow( _ tab: MainTab ) -> some View {
192192 if tab == . notification {
193193 tabLabel ( tab)
194- . badge ( coordinator. mainViewModel . state. unreadPushCount)
194+ . badge ( coordinator. viewModel . state. unreadPushCount)
195195 . tag ( tab)
196196 } else {
197197 tabLabel ( tab)
@@ -347,8 +347,8 @@ private extension MainView {
347347
348348 var mainAlertPresented : Binding < Bool > {
349349 Binding (
350- get: { coordinator. mainViewModel . state. showAlert } ,
351- set: { coordinator. mainViewModel . send ( . setAlert( $0) ) }
350+ get: { coordinator. viewModel . state. showAlert } ,
351+ set: { coordinator. viewModel . send ( . setAlert( $0) ) }
352352 )
353353 }
354354
0 commit comments