mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Added preview functionality for home page
This commit is contained in:
12
app/api/exit-preview/route.ts
Normal file
12
app/api/exit-preview/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { draftMode } from "next/headers";
|
||||
|
||||
export async function GET() {
|
||||
draftMode().disable();
|
||||
|
||||
return new Response(null, {
|
||||
status: 307,
|
||||
headers: {
|
||||
Location: `/`,
|
||||
},
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user