Cursor not working - unsure

Good day - not really sure where I am going wrong with regard to the prevpage function - next is working perfectly fine

 const [nftBalances, setNftBalances] = useState([]);
    const [nameSet, setName] = useState("");
    const [page, setPage] = useState("");
    const [pg, setPg] = useState();
    const [cursor, setCursor] = useState();
    const {Web3Api} = useMoralisWeb3Api();
  const {isInitialized, Moralis, account,isWeb3Enabled, enableWeb3} = useMoralis()
    const router=useRouter()
    const id = router.query.id

const fetchContract = async()=>{
    const options = {
        chain: "rinkeby",
        address: id,
      };
      const nfts = await Moralis.Web3API.token.getNFTOwners(options);
      let nftBalance = nfts.result;
      console.log(nfts)
      console.log(nfts.page) 
    setPage(nfts)
    setPg(nfts.page)
    setCursor(nfts.cursor)  
    setName(nftBalance[0]?.name)
    setNftBalances(nftBalance)
    }

    async function nextPage(){
      const next = await page.next()
      let nftBalance = next.result
      const pg = next.page
      setCursor(next.cursor)
      setPg(pg)
      setNftBalances(nftBalance)
      setPage(next)
     console.log(next)
    }
    console.log(pg)

    async function prevPage(){
      const options = {
        chain: "rinkeby",
        address: id,
        cursor: cursor,
      }
      const nfts = await Moralis.Web3API.token.getNFTOwners(options);
      let nftBalance = nfts.result;
      console.log(nfts)
      console.log(nfts.page) 
    setPage(nfts)
    setPg(nfts.page)
    setCursor(nfts.cursor)  
    
    setNftBalances(nftBalance)
    }

apologies - I thought cursor represented an Id for the page instead it represents the next page… How do I go backwards in pagination?

you can not go backward now with cursor pagination, only to the next page

ahh I see - is there any other method that allows one to go back?

if you save the previous data somehow locally, then you could go back by reading the previously saved data