change content view header based on input day
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user