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) Color(UIColor.systemBackground)
VStack { VStack {
Text("How is today?") Text(self.getTitle())
.font(.title) .font(.title)
.foregroundColor(Color(UIColor.label)) .foregroundColor(Color(UIColor.label))
.padding() .padding()
@@ -49,6 +49,16 @@ struct AddMoodHeaderView: View {
.padding() .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) { private func addItem(withMood mood: Mood) {
switch savedOnboardingData.inputDay { switch savedOnboardingData.inputDay {
case .Today: case .Today: