File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 3
3
## Unreleased
4
4
5
5
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
6
+ - [ react] feat: Add @sentry/react package (#2631 )
6
7
7
8
## 5.16.0
8
9
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ interface ProfilerProps {
66
66
67
67
class Profiler extends React . Component < ProfilerProps > {
68
68
public activity : number | null ;
69
-
70
69
public constructor ( props : ProfilerProps ) {
71
70
super ( props ) ;
72
71
@@ -101,14 +100,11 @@ class Profiler extends React.Component<ProfilerProps> {
101
100
}
102
101
}
103
102
104
- function withProfiler < P extends object > (
105
- WrappedComponent : React . ComponentType < P > ,
106
- profilerProps ?: ProfilerProps ,
107
- ) : React . FC < P > {
103
+ function withProfiler < P extends object > ( WrappedComponent : React . ComponentType < P > ) : React . FC < P > {
108
104
const componentDisplayName = WrappedComponent . displayName || WrappedComponent . name || UNKNOWN_COMPONENT ;
109
105
110
106
const Wrapped : React . FC < P > = ( props : P ) => (
111
- < Profiler componentDisplayName = { componentDisplayName } { ... profilerProps } >
107
+ < Profiler componentDisplayName = { componentDisplayName } >
112
108
< WrappedComponent { ...props } />
113
109
</ Profiler >
114
110
) ;
Original file line number Diff line number Diff line change @@ -66,13 +66,6 @@ describe('withProfiler', () => {
66
66
op : 'react' ,
67
67
} ) ;
68
68
} ) ;
69
-
70
- it ( 'is called with a custom displayName' , ( ) => {
71
- const ProfiledComponent = withProfiler ( ( ) => < h1 > Hello World</ h1 > , { componentDisplayName : 'Test' } ) ;
72
-
73
- create ( < ProfiledComponent /> ) ;
74
- expect ( mockPushActivity ) . toHaveBeenLastCalledWith ( 'Test' , expect . objectContaining ( { description : '<Test>' } ) ) ;
75
- } ) ;
76
69
} ) ;
77
70
} ) ;
78
71
} ) ;
You can’t perform that action at this time.
0 commit comments