Skip to content

Commit

Permalink
removed the commented out amount stuff since was not the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
storiwr committed Sep 3, 2020
1 parent 18879ce commit 5fd86d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion CardStack/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ struct CardInfo: Codable, Identifiable {
let id = UUID()
let name: String
let cardBody: String
// let amount: Int
}

class Cards: ObservableObject {
Expand Down
5 changes: 2 additions & 3 deletions CardStack/NewCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct NewCardView: View {
@ObservedObject var cards: Cards
@State private var name = ""
@State private var cardBody = ""
// @State private var amount = ""


var body: some View {
NavigationView {
Expand All @@ -23,11 +23,10 @@ struct NewCardView: View {
}
.navigationBarTitle("New Card")
.navigationBarItems(trailing: Button("Done") {
// if let actualAmount = Int(self.amount) {

let item = CardInfo(name: self.name, cardBody: self.cardBody)
self.cards.items.append(item)
self.presentationMode.wrappedValue.dismiss()
// }
})
}
}
Expand Down

0 comments on commit 5fd86d5

Please sign in to comment.