Issue with value not being passed down correctly.
Am still working on learning pagination. I am trying to use less repeated code, so turned my button click into its own function. When I click a number I can get it to go to the correct page, but when I use the previous button, it changed the current page to 0 no matter what the page is. The initial value is set at 1. I understand this means the function call is using the initial value.
https://codepen.io/bsups/pen/xxypaWE
https://codepen.io/bsups/pen/xxypaWE

