Files
94d6a432fa Examples:Updated with-slate example to App Router (#68060)
This PR updates the with-slate example to use the App Router. Here are
the changes that have been made:

Renamed the "pages" folder to the "app" folder.
Updated the routing for iindex.tsx files to align with the App Router.
Added the layout.tsx file as part of the App Router.
Updated API folder structure with app router.
Updated Slate component code accordingly new version of slate library
Updated the package.json file.

cc @samcx

---------

Co-authored-by: samcx <[email protected]>
2024-07-24 14:43:01 +00:00

9 lines
203 B
TypeScript

export async function POST(req: Request) {
const editorState = await req.json();
console.log("TODO: Save editorState on the server", editorState);
return Response.json({
status: "ok",
});
}