You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Regarding your Example App, I changed MainCoordinator to be my TabBarCoordinator (which is mostly looks like AuthenticatedCoordinator in Example App):
finalclassMainCoordinator:TabCoordinatable{varchild=TabChild(startingItems:[
\MainCoordinator.home,
\MainCoordinator.chart,
\MainCoordinator.profile
])varuser:User?@Route(tabItem: makeHomeTab)varhome= makeHome
@Route(tabItem: makeChartTab)varchart= makeChart
@Route(tabItem: makeProfileTab)varprofile= makeProfile
init(){self.user =nil// or read from AuthService}@ViewBuilderfunc sharedView(_ view:AnyView)->someView{
view.onReceive(AuthenticationService.shared.$status, perform:{ status in
switch status {case.unauthenticated:self.user =nilcase.authenticated(let user):self.user = user
// profile = makeProfile // <--- Error here: Cannot assign value of type '() -> NavigationViewCoordinator<ProfileCoordinator>' to type 'Content<MainCoordinator, NavigationViewCoordinator<ProfileCoordinator>>'}})}
What I want to know - how can I reload profile tab? I want to display user avatar and name on tab item if user is authenticated.
The text was updated successfully, but these errors were encountered:
Hi! Regarding your Example App, I changed
MainCoordinator
to be my TabBarCoordinator (which is mostly looks like AuthenticatedCoordinator in Example App):What I want to know - how can I reload profile tab? I want to display user avatar and name on tab item if user is authenticated.
The text was updated successfully, but these errors were encountered: