This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { getApp as getBkndApp } from "bknd/adapter/react-router";
|
||||
import config from "../bknd.config";
|
||||
import { getApp as getUserbaseApp } from "userbase/adapter/react-router";
|
||||
import config from "../userbase.config";
|
||||
|
||||
export async function getApp() {
|
||||
return await getBkndApp(config, process.env as any);
|
||||
return await getUserbaseApp(config, process.env as any);
|
||||
}
|
||||
|
||||
export async function getApi(args?: { request: Request }, opts?: { verify?: boolean }) {
|
||||
|
||||
@@ -5,13 +5,13 @@ import {
|
||||
useFetcher,
|
||||
useLoaderData,
|
||||
} from "react-router";
|
||||
import { getApi } from "~/bknd";
|
||||
import { getApi } from "~/userbase";
|
||||
|
||||
// biome-ignore lint/correctness/noEmptyPattern: <explanation>
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [
|
||||
{ title: "New bknd React Router App" },
|
||||
{ name: "description", content: "Welcome to bknd & React Router!" },
|
||||
{ title: "New userbase React Router App" },
|
||||
{ name: "description", content: "Welcome to userbase & React Router!" },
|
||||
];
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function Index() {
|
||||
<div className="flex h-screen items-center justify-center">
|
||||
<div className="flex flex-col items-center gap-16">
|
||||
<header className="flex flex-col items-center gap-9">
|
||||
<img src="/bknd.svg" alt="bknd" className="block w-48 dark:invert" />
|
||||
<img src="/userbase.svg" alt="userbase" className="block w-48 dark:invert" />
|
||||
<div className="h-[144px] w-96">
|
||||
<img
|
||||
src="/logo-light.svg"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { lazy, Suspense, useSyncExternalStore } from "react";
|
||||
import { type LoaderFunctionArgs, useLoaderData } from "react-router";
|
||||
import { getApi } from "~/bknd";
|
||||
import { getApi } from "~/userbase";
|
||||
|
||||
const Admin = lazy(() => import("bknd/ui").then((mod) => ({ default: mod.Admin })));
|
||||
import "bknd/dist/styles.css";
|
||||
const Admin = lazy(() => import("userbase/ui").then((mod) => ({ default: mod.Admin })));
|
||||
import "userbase/dist/styles.css";
|
||||
|
||||
export const loader = async (args: LoaderFunctionArgs) => {
|
||||
const api = await getApi(args, { verify: true });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getApp } from "~/bknd";
|
||||
import { getApp } from "~/userbase";
|
||||
|
||||
const handler = async (args: { request: Request }) => {
|
||||
const app = await getApp();
|
||||
|
||||
Reference in New Issue
Block a user