Next.js 9.4 SSG - empty sidebar on initial load

Hi, first post here. :slight_smile:

I’m using Next.js 9.4 SSG. In dev mode, when I visit a dynamic route (ex: […slug].js) that was pre-rendered, the sidebar initially appears empty. After a refresh, the sidebar fields appear.

The data is coming from a Postgres database so I couldn’t completely follow any of the guides. Though I tried to follow as close as possible.

The goal is to use Tina to send a request to a GraphQL API that then updates the DB.

Update: I needed to use Next.js “Preview Mode” similar to what’s being done in this guide: https://tinacms.org/guides/nextjs/github-open-authoring/configure-custom-app

2 Likes

Hey @Ron, thanks for the question :grinning:!
To use preview mode you will have to follow the steps in nextjs’s preview mode docs. You can also see how we did it with open authoring here

2 Likes