[feature/frontend] Add debug sections to settings panel (#2950)

* [feature/frontend] Add debug sections to settings panel

* max-width

* swagger
This commit is contained in:
tobi
2024-06-03 11:20:53 +02:00
committed by GitHub
parent 04bcde08a1
commit d79c2f2688
15 changed files with 395 additions and 22 deletions

View File

@ -21,6 +21,7 @@ import { createContext, useContext } from "react";
const RoleContext = createContext<string[]>([]);
const BaseUrlContext = createContext<string>("");
const MenuLevelContext = createContext<number>(0);
const InstanceDebugContext = createContext<boolean>(false);
function urlSafe(str: string) {
return str.toLowerCase().replace(/[\s/]+/g, "-");
@ -67,6 +68,10 @@ function useMenuLevel() {
return useContext(MenuLevelContext);
}
function useInstanceDebug() {
return useContext(InstanceDebugContext);
}
export {
urlSafe,
RoleContext,
@ -76,4 +81,6 @@ export {
useBaseUrl,
MenuLevelContext,
useMenuLevel,
InstanceDebugContext,
useInstanceDebug,
};