updated nextjs example with app router

This commit is contained in:
dswbx
2025-02-27 20:09:03 +01:00
parent 2d5da63eb2
commit 09074f6591
36 changed files with 334 additions and 284 deletions
+14
View File
@@ -0,0 +1,14 @@
import { getApi } from "@/bknd";
export default async function SSRPage() {
const api = await getApi({ verify: true });
const { data } = await api.data.readMany("posts");
return (
<div>
<h1>Server-Side Rendered Page</h1>
<pre>{JSON.stringify(data, null, 2)}</pre>
<pre>{JSON.stringify(api.getUser(), null, 2)}</pre>
</div>
);
}