Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo of word 'couter' to 'counter' #16

Merged
merged 1 commit into from
Apr 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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