Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 40b05ed

Browse files
committed
Add preview notice
1 parent 03e9e1e commit 40b05ed

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pages/_app.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default function App({Component, pageProps}) {
5252
const {
5353
defaultSeo: {social, ...defaultSeoData} = {},
5454
menus,
55+
preview,
5556
...passThruProps
5657
} = pageProps
5758

@@ -82,6 +83,14 @@ export default function App({Component, pageProps}) {
8283
) : (
8384
<>
8485
{!!defaultSeoData && <DefaultSeo {...defaultSeoData} />}
86+
{!!preview && (
87+
// TODO -- abstract this to a component.
88+
<p>
89+
This page is a preview.{' '}
90+
<a href="/api/exit-preview">Click here</a> to exit preview
91+
mode.
92+
</p>
93+
)}
8594
<Component {...componentProps} />
8695
</>
8796
)}

0 commit comments

Comments
 (0)