File tree 1 file changed +2
-14
lines changed
packages/react-devtools-shared/src/devtools/views/Components 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 8
8
*/
9
9
10
10
import * as React from 'react' ;
11
- import {
12
- ElementTypeForwardRef ,
13
- ElementTypeMemo ,
14
- } from 'react-devtools-shared/src/types' ;
15
11
import styles from './HocBadges.css' ;
16
12
17
13
import type { Element } from './types' ;
@@ -21,22 +17,14 @@ type Props = {|
21
17
| } ;
22
18
23
19
export default function HocBadges ( { element} : Props ) {
24
- const { hocDisplayNames, type } = ( ( element : any ) : Element ) ;
20
+ const { hocDisplayNames} = ( ( element : any ) : Element ) ;
25
21
26
- let typeBadge = null ;
27
- if ( type === ElementTypeMemo ) {
28
- typeBadge = 'Memo' ;
29
- } else if ( type === ElementTypeForwardRef ) {
30
- typeBadge = 'ForwardRef' ;
31
- }
32
-
33
- if ( hocDisplayNames === null && typeBadge === null ) {
22
+ if ( hocDisplayNames === null ) {
34
23
return null ;
35
24
}
36
25
37
26
return (
38
27
< div className = { styles . HocBadges } >
39
- { typeBadge !== null && < div className = { styles . Badge } > { typeBadge } </ div > }
40
28
{ hocDisplayNames !== null &&
41
29
hocDisplayNames . map ( hocDisplayName => (
42
30
< div key = { hocDisplayName } className = { styles . Badge } >
You can’t perform that action at this time.
0 commit comments