-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
* refactor: add current user provider * chore: add required properties to current user provider * refactor: rewrite section navigation and home components * refactor: replace all usage of the old current user hook by the new one * refactor: move new use current user hook to hooks folder * refactor: remove all usage of api * chore: remove console.log and prop error * refactor: remove unused files * chore: cleanup unused deps * chore: fix jest test suite * chore: fix cypress test suite * chore: update network fixtures and test against 2.40
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,8 @@ | ||
{ | ||
"count": 662, | ||
"totalResponseSize": 780349, | ||
"duplicates": 514, | ||
"nonDeterministicResponses": 55, | ||
"count": 0, | ||
"totalResponseSize": 0, | ||
"duplicates": 0, | ||
"nonDeterministicResponses": 0, | ||
"apiVersion": "38", | ||
"fixtureFiles": [ | ||
"static_resources.json", | ||
"show_tiles_with_list_and_add_action_to_all_available_sections.json", | ||
"the_app_has_a_main_navigation.json", | ||
"user_groups_can_be_listed.json", | ||
"the_user_group_list_can_be_searched.json", | ||
"user_roles_can_be_listed.json", | ||
"the_user_role_list_can_be_searched.json", | ||
"users_can_be_listed.json", | ||
"the_user_list_can_be_searched.json" | ||
] | ||
"fixtureFiles": [] | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"count": 337, | ||
"totalResponseSize": 213240, | ||
"duplicates": 263, | ||
"nonDeterministicResponses": 24, | ||
"apiVersion": "40", | ||
"fixtureFiles": [ | ||
"static_resources.json", | ||
"show_tiles_with_list_and_add_action_to_all_available_sections.json", | ||
"the_app_has_a_main_navigation.json", | ||
"user_groups_can_be_listed.json", | ||
"the_user_group_list_can_be_searched.json", | ||
"user_roles_can_be_listed.json", | ||
"the_user_role_list_can_be_searched.json", | ||
"users_can_be_listed.json", | ||
"the_user_list_can_be_searched.json" | ||
] | ||
} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
import React from 'react' | ||
import { Router, Route } from 'react-router-dom' | ||
import { QueryParamProvider } from 'use-query-params' | ||
import SectionLoader from './components/SectionLoader.js' | ||
import SectionNavigation from './components/SectionNavigation.js' | ||
import history from './utils/history.js' | ||
|
||
/** | ||
* Main Component | ||
* @class | ||
*/ | ||
const App = () => ( | ||
<> | ||
<Router history={history} hashType={'noslash'}> | ||
<QueryParamProvider ReactRouterRoute={Route}> | ||
<SectionLoader /> | ||
</QueryParamProvider> | ||
</Router> | ||
</> | ||
<Router history={history} hashType={'noslash'}> | ||
<QueryParamProvider ReactRouterRoute={Route}> | ||
<SectionNavigation /> | ||
</QueryParamProvider> | ||
</Router> | ||
) | ||
|
||
export default App |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,15 @@ | ||
import './locales/index.js' | ||
|
||
import { useD2 } from '@dhis2/app-runtime-adapter-d2' | ||
import { CenteredContent, CircularLoader, CssVariables } from '@dhis2/ui' | ||
import { CssVariables } from '@dhis2/ui' | ||
import React from 'react' | ||
import { Provider } from 'react-redux' | ||
import api from './api/index.js' | ||
import App from './App.js' | ||
import store from './store.js' | ||
|
||
const AppWrapper = () => { | ||
const { d2 } = useD2({ | ||
d2Config: { | ||
schemas: [ | ||
'userRole', | ||
'user', | ||
'userGroup', | ||
'userCredentials', | ||
'organisationUnit', | ||
], | ||
}, | ||
i18nRoot: './d2i18n', | ||
onInitialized: (d2) => { | ||
api.init(d2) | ||
}, | ||
}) | ||
|
||
if (!d2) { | ||
return ( | ||
<CenteredContent> | ||
<CircularLoader /> | ||
</CenteredContent> | ||
) | ||
} | ||
|
||
return ( | ||
<> | ||
<CssVariables spacers colors theme /> | ||
<Provider store={store}> | ||
<App /> | ||
</Provider> | ||
</> | ||
) | ||
} | ||
import { CurrentUserProvider } from './components/CurrentUserProvider.js' | ||
|
||
const AppWrapper = () => ( | ||
<CurrentUserProvider> | ||
<CssVariables spacers colors theme /> | ||
<App /> | ||
</CurrentUserProvider> | ||
) | ||
|
||
export default AppWrapper |
This file was deleted.