Implement React Context API

- Move API GET request to /v2/config out to the top level of our App.
- Store /v2/config response data in sessionStorage.
- Use Context API to pass down relevant data to Organizations component.
- Wrap our AnsibleSelect component as a context consumer and pass in the list of Ansible Environments of the logged in user.
- Clear sessionStorage object when user logs out.
- Update unit tests.
This commit is contained in:
kialam
2018-12-17 11:44:11 -05:00
parent 7ea5ea2ecd
commit b8fc402d55
8 changed files with 115 additions and 41 deletions

View File

@@ -46,6 +46,7 @@
"@patternfly/react-styles": "^2.3.0",
"@patternfly/react-tokens": "^1.9.0",
"axios": "^0.18.0",
"prop-types": "^15.6.2",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-router-dom": "^4.3.1"