fix: remove History tab, add Foods tab, fix FitnessTabView
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,9 +7,9 @@ struct FitnessTabView: View {
|
|||||||
|
|
||||||
enum FitnessTab: String, CaseIterable {
|
enum FitnessTab: String, CaseIterable {
|
||||||
case today = "Today"
|
case today = "Today"
|
||||||
case history = "History"
|
|
||||||
case templates = "Templates"
|
case templates = "Templates"
|
||||||
case goals = "Goals"
|
case goals = "Goals"
|
||||||
|
case foods = "Foods"
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
@@ -23,14 +23,16 @@ struct FitnessTabView: View {
|
|||||||
switch selectedTab {
|
switch selectedTab {
|
||||||
case .today:
|
case .today:
|
||||||
TodayView(viewModel: todayVM, showFoodSearch: $showFoodSearch)
|
TodayView(viewModel: todayVM, showFoodSearch: $showFoodSearch)
|
||||||
case .history:
|
|
||||||
HistoryView()
|
|
||||||
case .templates:
|
case .templates:
|
||||||
TemplatesView(dateString: todayVM.dateString) {
|
TemplatesView(dateString: todayVM.dateString) {
|
||||||
Task { await todayVM.load() }
|
Task { await todayVM.load() }
|
||||||
}
|
}
|
||||||
case .goals:
|
case .goals:
|
||||||
GoalsView()
|
GoalsView()
|
||||||
|
case .foods:
|
||||||
|
FoodLibraryView(dateString: todayVM.dateString) {
|
||||||
|
Task { await todayVM.load() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user