mirror of
https://github.com/ascribe/onion.git
synced 2025-01-18 08:46:10 +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 @@
|
|||||||
/**
|
// Ignore error as we may have more exports in the future
|
||||||
* Taken from react-router (https://github.com/reactjs/react-router/blob/master/modules/withRouter.js)
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
* FIXME: should be put into react-component's utils
|
export { getDisplayName } from 'react-utility-belt/es6/utils/react';
|
||||||
*/
|
|
||||||
export function getDisplayName(WrappedComponent) {
|
|
||||||
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user