mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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:
@ -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,
|
||||
};
|
||||
|
Reference in New Issue
Block a user