preview bar

This commit is contained in:
Joel Varty
2021-06-23 10:21:22 -04:00
parent 4929032e5f
commit 00922a8c7d
11 changed files with 396 additions and 139 deletions

View File

@@ -0,0 +1,12 @@
import { generatePreviewKey } from "@agility/nextjs/node"
export default async (req, res) => {
//TODO: Only generate the preview link if you are already in Preview!
//how can I check if i'm in preview mode already?
const previewKey = generatePreviewKey();
//Return a valid preview key
res.end(previewKey)
}