change content view header based on input day

This commit is contained in:
Trey t
2022-01-22 14:09:51 -06:00
parent dfe886a706
commit e1839d54ae

View File

@@ -20,7 +20,7 @@ struct AddMoodHeaderView: View {
Color(UIColor.systemBackground)
VStack {
Text("How is today?")
Text(self.getTitle())
.font(.title)
.foregroundColor(Color(UIColor.label))
.padding()
@@ -49,6 +49,16 @@ struct AddMoodHeaderView: View {
.padding()
}
private func getTitle() -> String {
switch savedOnboardingData.inputDay {
case .Today:
return "How is today?"
case .Previous:
return "How was yesterday?"
}
}
private func addItem(withMood mood: Mood) {
switch savedOnboardingData.inputDay {
case .Today: