verdaccio-ui/src/App/AppContext.tsx
Priscila Oliveira 5c06ace14a fix: routes - Replaced class by func. comp (#159)
* refactor: updated routes

* fix: fixed conflicts issues

* fix: rollback port
2019-10-19 10:49:04 +02:00

21 lines
488 B
TypeScript

import { createContext } from 'react';
import { FormError } from '../components/Login/Login';
export interface AppProps {
error?: FormError;
logoUrl: string;
user: {
username?: string;
};
scope: string;
showLoginModal: boolean;
isUserLoggedIn: boolean;
packages: [];
isLoading: boolean;
}
export const AppContext = createContext<Partial<AppProps>>({});
export const AppContextProvider = AppContext.Provider;
export const AppContextConsumer = AppContext.Consumer;