mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -03:30
fix unit tests for network handling
This commit is contained in:
@@ -67,13 +67,13 @@ class provider extends Component {
|
||||
|
||||
render () {
|
||||
const {
|
||||
value
|
||||
value: stateValue
|
||||
} = this.state;
|
||||
|
||||
const { children } = this.props;
|
||||
const { value: propsValue, children } = this.props;
|
||||
|
||||
return (
|
||||
<ConfigContext.Provider value={value}>
|
||||
<ConfigContext.Provider value={propsValue || stateValue}>
|
||||
{children}
|
||||
</ConfigContext.Provider>
|
||||
);
|
||||
|
||||
@@ -59,21 +59,20 @@ class prov extends Component {
|
||||
|
||||
render () {
|
||||
const {
|
||||
children
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
value
|
||||
value: stateValue
|
||||
} = this.state;
|
||||
|
||||
const { value: propsValue, children } = this.props;
|
||||
|
||||
return (
|
||||
<NetworkContext.Provider value={value}>
|
||||
<NetworkContext.Provider value={propsValue || stateValue}>
|
||||
{children}
|
||||
</NetworkContext.Provider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export { NetworkProvider as _NetworkProvider };
|
||||
export const NetworkProvider = withRootDialog(withRouter(prov));
|
||||
|
||||
export function withNetwork (Child) {
|
||||
|
||||
Reference in New Issue
Block a user