File tree Expand file tree Collapse file tree 1 file changed +13
-19
lines changed
static/app/components/u2f Expand file tree Collapse file tree 1 file changed +13
-19
lines changed Original file line number Diff line number Diff line change 1- import { Component } from 'react' ;
2-
31import { Authenticator } from 'sentry/types' ;
42
53import U2fSign from './u2fsign' ;
@@ -11,24 +9,20 @@ type Props = {
119 displayMode ?: U2fSign [ 'props' ] [ 'displayMode' ] ;
1210} ;
1311
14- class U2fContainer extends Component < Props > {
15- render ( ) {
16- const { className, authenticators} = this . props ;
17-
18- if ( ! authenticators . length ) {
19- return null ;
20- }
21-
22- return (
23- < div className = { className } >
24- { authenticators . map ( auth =>
25- auth . id === 'u2f' && auth . challenge ? (
26- < U2fSign key = { auth . id } { ...this . props } challengeData = { auth . challenge } />
27- ) : null
28- ) }
29- </ div >
30- ) ;
12+ function U2fContainer ( { className, authenticators, ...props } : Props ) {
13+ if ( ! authenticators . length ) {
14+ return null ;
3115 }
16+
17+ return (
18+ < div className = { className } >
19+ { authenticators . map ( auth =>
20+ auth . id === 'u2f' && auth . challenge ? (
21+ < U2fSign key = { auth . id } { ...props } challengeData = { auth . challenge } />
22+ ) : null
23+ ) }
24+ </ div >
25+ ) ;
3226}
3327
3428export default U2fContainer ;
You can’t perform that action at this time.
0 commit comments