mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
added bknd admin config override to make it easier to include <Admin />
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { MantineProvider } from "@mantine/core";
|
||||
import { Notifications } from "@mantine/notifications";
|
||||
import type { ModuleConfigs } from "modules";
|
||||
import React from "react";
|
||||
import { FlashMessage } from "ui/modules/server/FlashMessage";
|
||||
import { BkndProvider, ClientProvider, type ClientProviderProps, useBknd } from "./client";
|
||||
@@ -10,12 +11,16 @@ import { Routes } from "./routes";
|
||||
export type BkndAdminProps = {
|
||||
baseUrl?: string;
|
||||
withProvider?: boolean | ClientProviderProps;
|
||||
// @todo: add admin config override
|
||||
config?: ModuleConfigs["server"]["admin"];
|
||||
};
|
||||
|
||||
export default function Admin({ baseUrl: baseUrlOverride, withProvider = false }: BkndAdminProps) {
|
||||
export default function Admin({
|
||||
baseUrl: baseUrlOverride,
|
||||
withProvider = false,
|
||||
config
|
||||
}: BkndAdminProps) {
|
||||
const Component = (
|
||||
<BkndProvider>
|
||||
<BkndProvider adminOverride={config}>
|
||||
<AdminInternal />
|
||||
</BkndProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user