mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 21:06:04 +00:00
improved nextjs/remix adapters and docs, confirmed remix ssr working
This commit is contained in:
@@ -1,19 +1,4 @@
|
||||
import { Suspense, lazy, useEffect, useState } from "react";
|
||||
|
||||
const Admin = lazy(() => import("bknd/ui").then((mod) => ({ default: mod.Admin })));
|
||||
import { adminPage } from "bknd/adapter/remix";
|
||||
import "bknd/dist/styles.css";
|
||||
|
||||
export default function AdminPage() {
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
useEffect(() => {
|
||||
if (typeof window === "undefined") return;
|
||||
setLoaded(true);
|
||||
}, []);
|
||||
if (!loaded) return null;
|
||||
|
||||
return (
|
||||
<Suspense>
|
||||
<Admin />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
export default adminPage();
|
||||
|
||||
Reference in New Issue
Block a user