mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Remove displayName declaration from ProxyHandler's component
This commit is contained in:
parent
ec13e968a4
commit
df1e6a55c4
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user