updated admin to use swr hooks instead of react-query

This commit is contained in:
dswbx
2024-12-13 16:24:55 +01:00
parent 50c5adce0c
commit 8c91dff94d
20 changed files with 380 additions and 275 deletions

View File

@@ -1,9 +1,13 @@
import { useBknd } from "../../client/BkndProvider";
import { useBknd } from "ui/client/bknd";
export function Logo({ scale = 0.2, fill }: { scale?: number; fill?: string }) {
const { app } = useBknd();
const theme = app.getAdminConfig().color_scheme;
const svgFill = fill ? fill : theme === "light" ? "black" : "white";
export function Logo({
scale = 0.2,
fill,
theme = "light"
}: { scale?: number; fill?: string; theme?: string }) {
const $bknd = useBknd();
const _theme = theme ?? $bknd?.app?.getAdminConfig().color_scheme ?? "light";
const svgFill = fill ? fill : _theme === "light" ? "black" : "white";
const dim = {
width: Math.round(578 * scale),