# NextJS Prismic Toolbar/Exiting Previews

**URL:** <https://community.prismic.io/t/nextjs-prismic-toolbar-exiting-previews/1599>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [August 19, 2020, 12:31pm UTC](https://community.prismic.io/t/nextjs-prismic-toolbar-exiting-previews/1599 "2020-08-19T12:31:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgilbride](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@mgilbride](https://community.prismic.io/u/mgilbride)\
**Post date:** [August 19, 2020, 12:31pm UTC](https://community.prismic.io/t/nextjs-prismic-toolbar-exiting-previews/1599/1 "2020-08-19T12:31:55Z")

</div>

Hello,

I have previews working with NextJS following this article: [Next.js and Prismic - Prismic](https://prismic.io/docs/reactjs/getting-started/prismic-nextjs). 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

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [August 19, 2020, 10:17pm UTC](https://community.prismic.io/t/nextjs-prismic-toolbar-exiting-previews/1599/3 "2020-08-19T22:17:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [September 24, 2020, 1:53am UTC](https://community.prismic.io/t/nextjs-prismic-toolbar-exiting-previews/1599/4 "2020-09-24T01:53:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:28pm UTC](https://community.prismic.io/t/nextjs-prismic-toolbar-exiting-previews/1599/5 "2021-12-09T17:28:04Z")

</div>


