added fallback route to server, created extensive setup instructions in docs

This commit is contained in:
dswbx
2024-12-24 16:01:42 +01:00
parent 8ef11aa382
commit 06125f1afe
20 changed files with 564 additions and 174 deletions

View File

@@ -1,4 +1,4 @@
import type { InferGetServerSidePropsType } from "next";
import type { InferGetServerSidePropsType as InferProps } from "next";
import dynamic from "next/dynamic";
import { withApi } from "bknd/adapter/nextjs";
@@ -16,9 +16,7 @@ export const getServerSideProps = withApi(async (context) => {
};
});
export default function AdminPage({
user
}: InferGetServerSidePropsType<typeof getServerSideProps>) {
export default function AdminPage({ user }: InferProps<typeof getServerSideProps>) {
if (typeof document === "undefined") return null;
return (
<Admin withProvider={{ user }} config={{ basepath: "/admin", logo_return_path: "/../" }} />