added fully working astro example

This commit is contained in:
dswbx
2024-11-28 10:22:18 +01:00
parent 49c2a7b4db
commit 54b38401d8
12 changed files with 192 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
---
import { Api } from "bknd";
import { Admin } from "bknd/ui";
import "bknd/dist/styles.css";
export const prerender = false;
const api = new Api({
host: new URL(Astro.request.url).origin,
headers: Astro.request.headers
});
const user = api.getUser();
---
<html>
<body>
<Admin withProvider={{ user }} client:load />
</body>
</html>