Skip to content

Commit

Permalink
Delete @Environment(\.dismiss) private var dismiss
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Kochetkov committed Oct 20, 2023
1 parent 9d23caf commit 36ddd8b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
13 changes: 0 additions & 13 deletions Expense Tracker/View/Expense/ExpenseChartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ struct ExpenseChartView: View {
@State private var isLineGraph = false
@State var currentActiveItem: ExpenseData?
@State var plotWidth: CGFloat = 0
@Environment(\.dismiss) private var dismiss

let intervals: [Interval] = [.week, .month, .quarter, .all]

Expand Down Expand Up @@ -83,18 +82,6 @@ struct ExpenseChartView: View {
Spacer()
}
.navigationBarTitle("\(viewModel.category.name)", displayMode: .large)
.navigationBarBackButtonHidden(true)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Button {
dismiss()
} label: {
HStack {
Image(systemName: "chevron.backward")
}
}
}
}
.onAppear {
viewModel.updateChartData()
}
Expand Down
1 change: 0 additions & 1 deletion Expense Tracker/View/Expense/ExpenseDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ struct ExpenseDetailView: View {
@ObservedObject private var viewModel: ExpenseDetailViewModel
@State private var showExpensesModal = false
@State private var showExpenseChart = false
@Environment(\.dismiss) private var dismiss

init(category: ExpenseCategory) {
_viewModel = ObservedObject(wrappedValue: ExpenseDetailViewModel(category: category))
Expand Down
1 change: 0 additions & 1 deletion Expense Tracker/ViewModel/ChartViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class ChartViewModel: ObservableObject {
@Published var selectedInterval: Interval = .week
@Published var intervals: [Interval] = [.week, .month, .quarter, .all]


init() {
loadExpenses()
loadProfits()
Expand Down

0 comments on commit 36ddd8b

Please sign in to comment.