Skip to content

Commit

Permalink
Fix typo of word 'couter' to 'counter'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Dixon committed Mar 29, 2022
1 parent 97fa443 commit 316598d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/ConfettiSwiftUI/ConfettiSwiftUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public struct ConfettiCannon: View {
@StateObject private var confettiConfig:ConfettiConfig

@State var animate:[Bool] = []
@State var finishedAnimationCouter = 0
@State var finishedAnimationCounter = 0
@State var firtAppear = false
@State var error = ""

Expand Down Expand Up @@ -112,9 +112,9 @@ public struct ConfettiCannon: View {

public var body: some View {
ZStack{
ForEach(finishedAnimationCouter..<animate.count, id:\.self){ i in
ForEach(finishedAnimationCounter..<animate.count, id:\.self){ i in
ConfettiContainer(
finishedAnimationCouter: $finishedAnimationCouter,
finishedAnimationCounter: $finishedAnimationCounter,
confettiConfig: confettiConfig
)
}
Expand All @@ -139,7 +139,7 @@ public struct ConfettiCannon: View {

@available(iOS 14.0, macOS 11.0, watchOS 7, tvOS 14.0, *)
struct ConfettiContainer: View {
@Binding var finishedAnimationCouter:Int
@Binding var finishedAnimationCounter:Int
@StateObject var confettiConfig:ConfettiConfig
@State var firstAppear = true

Expand All @@ -152,7 +152,7 @@ struct ConfettiContainer: View {
.onAppear(){
if firstAppear{
DispatchQueue.main.asyncAfter(deadline: .now() + confettiConfig.animationDuration) {
self.finishedAnimationCouter += 1
self.finishedAnimationCounter += 1
}
firstAppear = false
}
Expand Down

0 comments on commit 316598d

Please sign in to comment.