Skip to content

Commit dc1c955

Browse files
committed
remove duplicate from HocBadges
1 parent 6a830d3 commit dc1c955

File tree

1 file changed

+2
-14
lines changed
  • packages/react-devtools-shared/src/devtools/views/Components

1 file changed

+2
-14
lines changed

packages/react-devtools-shared/src/devtools/views/Components/HocBadges.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
*/
99

1010
import * as React from 'react';
11-
import {
12-
ElementTypeForwardRef,
13-
ElementTypeMemo,
14-
} from 'react-devtools-shared/src/types';
1511
import styles from './HocBadges.css';
1612

1713
import type {Element} from './types';
@@ -21,22 +17,14 @@ type Props = {|
2117
|};
2218

2319
export default function HocBadges({element}: Props) {
24-
const {hocDisplayNames, type} = ((element: any): Element);
20+
const {hocDisplayNames} = ((element: any): Element);
2521

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) {
3423
return null;
3524
}
3625

3726
return (
3827
<div className={styles.HocBadges}>
39-
{typeBadge !== null && <div className={styles.Badge}>{typeBadge}</div>}
4028
{hocDisplayNames !== null &&
4129
hocDisplayNames.map(hocDisplayName => (
4230
<div key={hocDisplayName} className={styles.Badge}>

0 commit comments

Comments
 (0)