NextJS Prismic Toolbar/Exiting Previews

Hello,

I have previews working with NextJS following this article: Next.js and Prismic - Prismic. I have also added the prismic toolbar (which is not called out in the guide, but seems to work).

Why are we unable to exit the preview session by simply clicking the "X" in the toolbar? This seems to work with other frameworks (e.g. Gatsby).

Telling a non-technical user to url hack to /api/exit-preview is....less than ideal. Are there any other ways we might be able to accomplish this?

Thanks,

Matt

1 Like

Hello Matt, thank you very much for reaching out.

I totally understand that this may seem like a hacky approach for this feature, and yes, this extra step is only required when using NextJS.

We are aware of it and are working hard to implement a more intuitive way to do this (which is simply using the “X” that you mentioned), but in the meantime, it is the only correct way to correctly end a preview session.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.