@@ -170,12 +170,13 @@ export default class Authenticator extends Component {
170
170
< Loading />
171
171
] ;
172
172
173
- const props_children_names = React . Children . map ( props_children , child => child . type . name ) ;
173
+ // const props_children_names = React.Children.map(props_children, child => child.type.name);
174
174
const props_children_override = React . Children . map ( props_children , child => child . props . override ) ;
175
- hide = hide . filter ( ( component ) => ! props_children_names . includes ( component . name ) ) ;
176
- const hideLink = hide . filter ( ( component ) => {
177
- return ! props_children_override . some ( comp => comp === component ) ;
178
- } ) ;
175
+ // hide = hide.filter((component) =>!props_children_names.includes(component.name));
176
+ hide = hide . filter ( ( component ) => ! props_children . find ( child => child . type === component ) ) ;
177
+ // const hideLink = hide.filter((component) => {
178
+ // return !props_children_override.some(comp => comp === component);
179
+ // });
179
180
180
181
const render_props_children = React . Children . map ( props_children , ( child , index ) => {
181
182
return React . cloneElement ( child , {
@@ -187,7 +188,7 @@ export default class Authenticator extends Component {
187
188
onStateChange : this . handleStateChange ,
188
189
onAuthEvent : this . handleAuthEvent ,
189
190
hide,
190
- hideLink
191
+ override : props_children_override
191
192
} ) ;
192
193
} ) ;
193
194
@@ -201,7 +202,7 @@ export default class Authenticator extends Component {
201
202
onStateChange : this . handleStateChange ,
202
203
onAuthEvent : this . handleAuthEvent ,
203
204
hide,
204
- hideLink
205
+ override : props_children_override
205
206
} ) ;
206
207
} ) ;
207
208
0 commit comments