20 lines
560 B
TypeScript
20 lines
560 B
TypeScript
import { createContext } from "react";
|
|
|
|
export interface ProfileContextValue {
|
|
/** Profile every management surface reads/writes ("" = the dashboard
|
|
* process's own profile). */
|
|
profile: string;
|
|
/** The profile the dashboard process itself runs under. */
|
|
currentProfile: string;
|
|
/** Known profile names (includes "default"). */
|
|
profiles: string[];
|
|
setProfile: (name: string) => void;
|
|
}
|
|
|
|
export const ProfileContext = createContext<ProfileContextValue>({
|
|
profile: "",
|
|
currentProfile: "default",
|
|
profiles: [],
|
|
setProfile: () => {},
|
|
});
|