mirror of https://github.com/linkerd/linkerd2.git
15 lines
306 B
JavaScript
15 lines
306 B
JavaScript
import ApiHelpers from './ApiHelpers.jsx';
|
|
import React from 'react';
|
|
|
|
const Context = React.createContext({
|
|
api: ApiHelpers(""),
|
|
});
|
|
|
|
export const withContext = Component => props => (
|
|
<Context.Consumer>
|
|
{ctx => <Component {...props} {...ctx} />}
|
|
</Context.Consumer>
|
|
);
|
|
|
|
export default Context;
|