forked from sombochea/verdaccio-ui
42d3bb8508
* refactor: convert class to func * refactor: changed login form logic * refactor: conver to testing-library tests * refactor: moved dependency * refactor: replaced uglifyjs-webpack-plugin by terser-webpack-plugin * fix: fixed e2e errors * fix: fixed e2e test * Delete settings.json * fix: vscode settings rollback * refactor: rollback webpack config * refactor: updated eslint rule * fix: removed --fix * refactor: incresed the bundle size
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;
|