File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ const ProvConContainer = (props: ProvConContainerProps): JSX.Element => {
45
45
return null ;
46
46
} ;
47
47
const contextProvidersOnly = keepContextAndProviderNodes ( currentSnapshot ) ;
48
+ console . log ( 'before' , contextProvidersOnly ) ;
48
49
49
50
const filterComponentProperties = ( node : any ) : FilteredNode | null => {
50
51
if ( ! node ) return null ;
@@ -74,7 +75,7 @@ const ProvConContainer = (props: ProvConContainerProps): JSX.Element => {
74
75
if ( node . props && ! isEmptyObject ( node . props ) ) {
75
76
Object . entries ( node . props ) . forEach ( ( [ key , value ] ) => {
76
77
if ( ! isEmptyObject ( value ) ) {
77
- filteredNode [ `prop_ ${ key } ` ] = value ;
78
+ filteredNode [ `${ key } ` ] = value ;
78
79
}
79
80
} ) ;
80
81
}
@@ -108,12 +109,8 @@ const ProvConContainer = (props: ProvConContainerProps): JSX.Element => {
108
109
}
109
110
110
111
// Flatten root level hooksState if it exists
111
- if ( node . hooksState && ! isEmptyObject ( node . hooksState ) ) {
112
- Object . entries ( node . hooksState ) . forEach ( ( [ key , value ] ) => {
113
- if ( ! isEmptyObject ( value ) ) {
114
- filteredNode [ `hook_${ key } ` ] = value ;
115
- }
116
- } ) ;
112
+ if ( node . componentData . hooksState && ! isEmptyObject ( node . componentData . hooksState ) ) {
113
+ filteredNode [ 'State' ] = node . componentData . hooksState ;
117
114
}
118
115
119
116
// Process children and add them using the node's name as the key
You can’t perform that action at this time.
0 commit comments