Skip to content

Commit 53a39a3

Browse files
authored
Merge pull request #241 from TaskarCenterAtUW/feature-disable-button-empty-text
disable submit button when the text field is empty
2 parents bb5e239 + 611784f commit 53a39a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

GoInfoGame/GoInfoGame/UI/Map/CreateNoteView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ struct CreateNoteView: View {
4949
.cornerRadius(9)
5050
}
5151
}
52+
.disabled(noteText == "")
5253

5354
Button (action: {
5455
showNotesBox = false
@@ -87,8 +88,8 @@ struct CreateNoteView: View {
8788

8889
}
8990
} catch {
90-
alertMessage = "Error submitting note. Please try again later."
91-
print("Error creating note: \(error.localizedDescription)")
91+
alertMessage = "Error submitting note: \(error.localizedDescription)"
92+
9293
dismissSheet(alertMessage)
9394
}
9495

0 commit comments

Comments
 (0)