fix: routes - Replaced class by func. comp (#159)

* refactor: updated routes

* fix: fixed conflicts issues

* fix: rollback port
This commit is contained in:
Priscila Oliveira
2019-10-19 10:49:04 +02:00
committed by Juan Picado @jotadeveloper
parent 8c66dbc4d7
commit 5c06ace14a
6 changed files with 100 additions and 114 deletions

20
src/App/AppContext.tsx Normal file
View File

@@ -0,0 +1,20 @@
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;