I am trying to create and add a new Array into the state after each swaps but for some reason instead of adding all the array, it\'s only adding the last array in the state.