diff --git a/js/components/ascribe_routes/proxy_handler.js b/js/components/ascribe_routes/proxy_handler.js index e8d9bf6d..fc0d7ffa 100644 --- a/js/components/ascribe_routes/proxy_handler.js +++ b/js/components/ascribe_routes/proxy_handler.js @@ -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',