List { ForEach(restMock) { buisness in if #available(iOS 15.0, *) { restLayout(buisness: buisness) .padding() .swipeActions(edge: .trailing, allowsFullSwipe: true) { if typeSelected == .yes { Button { moveRest(buisness: buisness) } label: { VStack { Image(systemName: "hand.thumbsup") Text("Move to No List") } .foregroundColor(.white) } .background(.red) }else { Button { moveRest(buisness: buisness) } label: { VStack { Image(systemName: "hand.thumbsup") Text("Move to Yes List") } .foregroundColor(.white) } .background(.green) } } } else { restLayout(buisness: buisness) .padding() } } // .frame(height: 150) }