mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-19 13:56:04 +00:00
updated nextjs example with app router
This commit is contained in:
18
examples/nextjs/src/app/admin/[[...admin]]/page.tsx
Normal file
18
examples/nextjs/src/app/admin/[[...admin]]/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Admin } from "bknd/ui";
|
||||
import "bknd/dist/styles.css";
|
||||
import { getApi } from "@/bknd";
|
||||
|
||||
export default async function AdminPage() {
|
||||
const api = await getApi({ verify: true });
|
||||
|
||||
return (
|
||||
<Admin
|
||||
withProvider={{ user: api.getUser() }}
|
||||
config={{
|
||||
basepath: "/admin",
|
||||
logo_return_path: "/../",
|
||||
color_scheme: "system",
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user