problem with ForEach loop

when I'm using for each loop(using repeat command) instead of printing 5 items it is printing 10 times, it always doubles my command

it is my code

NavigationView {

            ScrollView {

                ScrollView(.horizontal , showsIndicators: false){

                    HStack(spacing: -10){

                        ForEach(0..<5) { item in

                            NavigationLink(destination: DetailView()) {

                                CardView()

                            CardView()

Accepted Reply

Why do you call CardView twice ?

Replies

Why do you call CardView twice ?

Oh its my mistake thanks❤️