mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-13 03:21:49 -05:00
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:
3
src/context.jsx
Normal file
3
src/context.jsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import React from "react";
|
||||
|
||||
export const ConfigContext = React.createContext({});
|
||||
Reference in New Issue
Block a user