mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-12-12 14:38:36 +03:00
ca71038874
* Custom Menu Items * update readme * fix indentation
18 lines
385 B
TypeScript
18 lines
385 B
TypeScript
import { createContext, useContext } from "react";
|
|
|
|
interface AppContextType {
|
|
restrictBaseUrl: string | string[];
|
|
asManagedUsers: string[];
|
|
supportURL: string;
|
|
menu: MenuItem[];
|
|
}
|
|
|
|
interface MenuItem {
|
|
label: string;
|
|
icon: string;
|
|
url: string;
|
|
}
|
|
|
|
export const AppContext = createContext({});
|
|
|
|
export const useAppContext = () => useContext(AppContext) as AppContextType;
|