Skip to content

Commit

Permalink
refactor: placement of .voErrorSheet()
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba committed Nov 27, 2024
1 parent 1b7c6fb commit 4cbaa86
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/Screens/Account/AccountSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ struct AccountSettings: View, ViewDataProvider, LoadStateProvider, ErrorPresenta
}
.navigationBarTitleDisplayMode(.inline)
.navigationTitle("Settings")
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
.onAppear {
accountStore.tokenStore = tokenStore
if tokenStore.token != nil {
Expand All @@ -122,6 +121,7 @@ struct AccountSettings: View, ViewDataProvider, LoadStateProvider, ErrorPresenta
onAppearOrChange()
}
}
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
}

private func performDelete() {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Screens/Group/GroupSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ struct GroupSettings: View, ErrorPresentable {
}
}
}
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
}
}
.navigationTitle("Settings")
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
}

private func performDelete() {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Screens/Invitation/InvitationOverview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ struct InvitationOverview: View, TokenDistributing, ErrorPresentable {
}
.navigationBarTitleDisplayMode(.inline)
.navigationTitle("#\(invitation.id)")
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
.onAppear {
userStore.invitationID = invitation.id
if let token = tokenStore.token {
Expand All @@ -147,6 +146,7 @@ struct InvitationOverview: View, TokenDistributing, ErrorPresentable {
assignTokenToStores(newToken)
}
}
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
}

private var isProcessing: Bool {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Screens/Organization/OrganizationSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ struct OrganizationSettings: View, ErrorPresentable {
}
}
}
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
}
}
.navigationBarTitleDisplayMode(.inline)
.navigationTitle("Settings")
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
}

private func performDelete() {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Screens/Workspace/WorkspaceSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ struct WorkspaceSettings: View, ViewDataProvider, LoadStateProvider, ErrorPresen
}
}
.navigationTitle("Settings")
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
.onAppear {
if tokenStore.token != nil {
onAppearOrChange()
Expand All @@ -108,6 +107,7 @@ struct WorkspaceSettings: View, ViewDataProvider, LoadStateProvider, ErrorPresen
onAppearOrChange()
}
}
.voErrorSheet(isPresented: $errorIsPresented, message: errorMessage)
}

private func performDelete() {
Expand Down

0 comments on commit 4cbaa86

Please sign in to comment.