First of all, in the page, the data object is changed with usestate and the screen is drawn! Save the scroll value and data when leaving the page to remember the scroll value on the page. As a result of the confirmation, the changed value is saved, but when I come back, this error keeps popping up.
const mainPageCopy = { ...store.mainPage };
mainPageList.forEach(function (value, index) {
mainPageCopy.list[index] = value;
mainPageCopy.scroll = document.querySelector(".body").scrollTop;
});
dispatch({ type: "mainPage/set", payload: mainPageCopy })
router.push(`/product/${value.product_seq}`);
This is not even saved to the store
