diff --git a/src/AppWrapper.js b/src/AppWrapper.js index 87502cf80..6d4262b87 100644 --- a/src/AppWrapper.js +++ b/src/AppWrapper.js @@ -12,35 +12,22 @@ import './locales' const muiTheme = () => createMuiTheme(dhis2theme) -const schemas = [ - 'chart', - 'map', - 'report', - 'reportTable', - 'eventChart', - 'eventReport', - 'dashboard', - 'organisationUnit', - 'userGroup', -] - -const appConfig = { - schemas, +const d2Config = { + schemas: ['dashboard'], } -const authorization = process.env.REACT_APP_DHIS2_AUTHORIZATION || null - // TODO: ER and EV plugins require the auth header in development mode. // Remove this when these plugins are rewritten +const authorization = process.env.REACT_APP_DHIS2_AUTHORIZATION || null if (authorization) { - appConfig.headers = { Authorization: authorization } + d2Config.headers = { Authorization: authorization } } const AppWrapper = () => { return ( - + {({ d2 }) => { if (!d2) { // TODO: Handle errors in d2 initialization