mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This `draftMode` prop was missing from the previous PR: - https://github.com/vercel/next.js/pull/48669 It was added on `GetStaticPropsContext` but not on `GetServerSidePropsContext` so this PR fixes it. ---------
7 lines
181 B
TypeScript
7 lines
181 B
TypeScript
import type { NextApiRequest, NextApiResponse } from 'next'
|
|
|
|
export default (req: NextApiRequest, res: NextApiResponse) => {
|
|
const { draftMode } = req
|
|
res.json({ draftMode })
|
|
}
|