I've been trying to set up Preview for my global state such as Navbar, Footer, etc which I currently query in _app.js in my Next.js website, but I can't figure out how to do it.
Hello @kris, what has worked for me is creating the queries on the same page where I'm using the data. That way, I can use the previewDataref from the props of getStaticProps and pass it to the queries.
If you don't want to have all the queries on the same page, you can create a helper function elsewhere, like in the /utils folder, and then you just pass the ref to those queries. That way the page template isn't cluttered,
Pau
closed , flag & select 'Something Else' to reopen.
4
This thread has been closed due to inactivity. Flag to reopen.