how to hide button if last page is reached using SwiftUI
I am trying to create a ButtonView where i have 2 buttons at the bottom of the page: “Next” and “Previous”. The issue i am having is if the user reaches the last page in the loop, i want to be able to hide the “Next” button so that only the “Previous” button shows only when on last page and both buttons show when on any other page other than the last page.