68b51415ec
This PR updates the examples to use Draft Mode introduced in [Next.js 13.4](https://nextjs.org/blog/next-13-4) fix NEXT-1153
8 lines
229 B
TypeScript
8 lines
229 B
TypeScript
export default async function exit(_, res) {
|
|
// Exit Draft Mode by removing the cookie
|
|
res.setDraftMode({ enable: false })
|
|
|
|
// Redirect the user back to the index page.
|
|
res.writeHead(307, { Location: '/' })
|
|
res.end()
|
|
}
|