From d2ab9bcc85f8ee38912eefe7866a8b023421cac4 Mon Sep 17 00:00:00 2001 From: Arthur Denner Date: Mon, 22 Aug 2022 21:46:54 +0200 Subject: [PATCH] Mention router.isPreview on Preview Mode page (#39830) The documentation is concise and straightforward, so I just added a sentence. Let me know if you'd like to describe more, add an example, etc. Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com> --- docs/advanced-features/preview-mode.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/advanced-features/preview-mode.md b/docs/advanced-features/preview-mode.md index a6700718692d..e9cd56f40f61 100644 --- a/docs/advanced-features/preview-mode.md +++ b/docs/advanced-features/preview-mode.md @@ -173,6 +173,8 @@ https:///api/preview?secret=&slug= ## More Details +> **Note**: during rendering `next/router` exposes an `isPreview` flag, see the [router object docs](/docs/api-reference/next/router.md#router-object) for more info. + ### Clear the Preview Mode cookies By default, no expiration date is set for Preview Mode cookies, so the preview session ends when the browser is closed.