1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Remove displayName declaration from ProxyHandler's component

This commit is contained in:
Brett Sun 2016-06-10 10:22:04 +02:00
parent ec13e968a4
commit df1e6a55c4

View File

@ -77,9 +77,10 @@ export function AuthRedirect({ to, when }) {
*/
export function ProxyHandler(...redirectFunctions) {
return (Component) => {
const ProxyHandlerComponent = React.createClass({
displayName: 'ProxyHandler',
// Don't worry about shadowing the HOC here; using a declaration like this allows
// babel-plugin-react-display-name to automatically generate the displayName.
// eslint-disable-next-line no-shadow
const ProxyHandler = React.createClass({
propTypes: {
// Injected through HOCs
currentUser: currentUserShape.isRequired,
@ -120,7 +121,7 @@ export function ProxyHandler(...redirectFunctions) {
}
});
return withContext(ProxyHandlerComponent,
return withContext(ProxyHandler,
'currentUser',
'isLoggedIn',
'location',