# Preview changes soon not working anymore

**URL:** <https://community.prismic.io/t/preview-changes-soon-not-working-anymore/7423>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [October 12, 2021, 2:31pm UTC](https://community.prismic.io/t/preview-changes-soon-not-working-anymore/7423 "2021-10-12T14:31:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter2](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@peter2](https://community.prismic.io/u/peter2)\
**Post date:** [October 12, 2021, 2:31pm UTC](https://community.prismic.io/t/preview-changes-soon-not-working-anymore/7423/1 "2021-10-12T14:31:04Z")

</div>

The docu on how to implement the Preview mentions that the following line needs to be added to \_documents.

```auto
import { apiEndpoint } from "./../sm.json"; // import the endpoint name
const prismicRepoName = /([a-zA-Z0-9-]+)?(\.cdn)?\.prismic\.io/.exec(apiEndpoint)[1] //Regex to get repo ID

```

NextJS however raises a warning: Should not import the named export 'apiEndpoint' (imported as 'apiEndpoint') from default-exporting module (only default export is available soon)

Obviously i could hardcode the repo name, but ideally i would like to keep this logic but make it future proof. a) Does anyone have already a solution  
b) Can Prismic pick this up and update the docu with a future proof solution

Thanks,  
Goppi

---

<div class="post-metadata">

**Author:** ![peter2](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@peter2](https://community.prismic.io/u/peter2)\
**Post date:** [October 12, 2021, 2:38pm UTC](https://community.prismic.io/t/preview-changes-soon-not-working-anymore/7423/2 "2021-10-12T14:38:47Z")

</div>

Looks like i found already a solution. The docu i was referring to is [this](https://prismic.io/docs/technologies/deployment-and-previews-nextjs)

Another [docu](https://prismic.io/docs/technologies/previews-nextjs) uses a different approach that seems to solve the warning:  
`import { repoName } from 'prismic-configuration'`

---

<div class="post-metadata">

**Author:** ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)\
**Post date:** [October 14, 2021, 7:38am UTC](https://community.prismic.io/t/preview-changes-soon-not-working-anymore/7423/5 "2021-10-14T07:38:04Z")

</div>

@peter2 Thanks for this feedback. We're currently working on updating the Next.js docs. We will take a closer look at the Preview page and make sure that things are more clear there.

Let us know if you need help with anything else at any point 🙂

---

<div class="post-metadata">

**Author:** ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)\
**Post date:** [October 14, 2021, 7:38am UTC](https://community.prismic.io/t/preview-changes-soon-not-working-anymore/7423/6 "2021-10-14T07:38:17Z")

</div>



---

<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, 3:22pm UTC](https://community.prismic.io/t/preview-changes-soon-not-working-anymore/7423/7 "2021-12-09T15:22:23Z")

</div>


