Previous Page Button

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets, and reproduction steps)
I have an image and gave it an interaction with code, window.history.back(), to return the user to its previous page. But when I am running my Next.js application locally I get Unhandled Runtime Error

Error: There was an error while hydrating this Suspense boundary. Switched to client rendering.

How can I fix this?

Hi, you need to check if this is caused by some sort of hydration error in your application when you are trying to access window in the server. If the error is happening even when you remove the invalid references to document/window from your project, you may check if it’s similar to "Error: This Suspense boundary received an update before it finished hydrating" using third party use-local-storage-state