mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Move getDisplayName to react-utility-belt
This commit is contained in:
parent
bf68efcd96
commit
1511f06504
10
js/utils/react.js
vendored
10
js/utils/react.js
vendored
@ -1,7 +1,3 @@
|
||||
/**
|
||||
* Taken from react-router (https://github.com/reactjs/react-router/blob/master/modules/withRouter.js)
|
||||
* FIXME: should be put into react-component's utils
|
||||
*/
|
||||
export function getDisplayName(WrappedComponent) {
|
||||
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
||||
}
|
||||
// Ignore error as we may have more exports in the future
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export { getDisplayName } from 'react-utility-belt/es6/utils/react';
|
||||
|
Loading…
Reference in New Issue
Block a user