forked from sombochea/verdaccio-ui
20 lines
360 B
TypeScript
20 lines
360 B
TypeScript
|
import { createContext } from 'react';
|
||
|
|
||
|
export interface AppProps {
|
||
|
user?: User;
|
||
|
scope: string;
|
||
|
packages: any[];
|
||
|
}
|
||
|
|
||
|
export interface User {
|
||
|
username: string;
|
||
|
}
|
||
|
|
||
|
export interface AppContextProps extends AppProps {
|
||
|
setUser: (user?: User) => void;
|
||
|
}
|
||
|
|
||
|
const AppContext = createContext<undefined | AppContextProps>(undefined);
|
||
|
|
||
|
export default AppContext;
|