diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2019-01-17 08:50:30 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-02-11 09:11:24 +0100 |
commit | b6aeddaea44525337d14ed3566fcd5f08d1e671f (patch) | |
tree | c282b7f8b88b6c945e507465aa321e52fb4c37b9 /server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx | |
parent | 8b7cd93d7a751fd49e8df3faef1cf03e320f470a (diff) | |
download | sonarqube-b6aeddaea44525337d14ed3566fcd5f08d1e671f.tar.gz sonarqube-b6aeddaea44525337d14ed3566fcd5f08d1e671f.zip |
SONAR-8697 Enable keyboard file navigation in Code page
Diffstat (limited to 'server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx b/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx index e5f8ca3fe64..8a11dbe7428 100644 --- a/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withCurrentUser.tsx @@ -19,15 +19,14 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; +import { getWrappedDisplayName } from './utils'; import { Store, getCurrentUser } from '../../store/rootReducer'; export function withCurrentUser<P>( WrappedComponent: React.ComponentClass<P & { currentUser: T.CurrentUser }> ) { - const wrappedDisplayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; - class Wrapper extends React.Component<P & { currentUser: T.CurrentUser }> { - static displayName = `withCurrentUser(${wrappedDisplayName})`; + static displayName = getWrappedDisplayName(WrappedComponent, 'withCurrentUser'); render() { return <WrappedComponent {...this.props} />; |