Flash Cards now used stored lesson information
This commit is contained in:
@@ -16,7 +16,6 @@ struct FlashCardResultsView: View {
|
||||
|
||||
@State private var wordStatistics: [String: Double] = [:]
|
||||
@State private var sortedWordStatistics: [(String, Double)] = []
|
||||
@State private var statistics = 0.0
|
||||
|
||||
func calculateStatistics() {
|
||||
for answer in answers {
|
||||
@@ -38,7 +37,6 @@ struct FlashCardResultsView: View {
|
||||
} else {
|
||||
return Color.red
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -57,13 +55,6 @@ struct FlashCardResultsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
extension Double {
|
||||
func formatAsPercent(places: Int) -> String {
|
||||
let formattedValue = String(format: "%.2f", self)
|
||||
return formattedValue
|
||||
}
|
||||
}
|
||||
|
||||
struct FlashCardResultView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
FlashCardResultsView()
|
||||
|
||||
Reference in New Issue
Block a user