Exit Preview ----

Had confusing error exiting preview, with function by created with slicemachine init function.

If someone else ends up with it just add default to /api/exit-preview endpoint

Should look like that

import { NextApiRequest } from "next";
import { exitPreview } from "@prismicio/next";
import { NextApiResponseLike } from "node_modules/@prismicio/next/dist/types";

export default async function handler(req: NextApiRequest, res: NextApiResponseLike) {
return exitPreview({ req, res });
}

Hi @gig.gabriel97 m

Welcome to the community!

Can you tell me what the error you were seeing was?

Thanks.