@@ -16,8 +16,18 @@ import PanelItem from 'sentry/components/panels/panelItem';
16
16
import { IconClose , IconDelete } from 'sentry/icons' ;
17
17
import { t } from 'sentry/locale' ;
18
18
import { space } from 'sentry/styles/space' ;
19
+ import type { AuthenticatorDevice } from 'sentry/types/auth' ;
19
20
20
- function U2fEnrolledDetails ( props : any ) {
21
+ interface U2fEnrolledDetailsProps {
22
+ devices : AuthenticatorDevice [ ] ;
23
+ id : string ;
24
+ isEnrolled : boolean ;
25
+ onRemoveU2fDevice : ( device : AuthenticatorDevice ) => void ;
26
+ onRenameU2fDevice : ( device : AuthenticatorDevice , deviceName : string ) => void ;
27
+ className ?: string ;
28
+ }
29
+
30
+ function U2fEnrolledDetails ( props : U2fEnrolledDetailsProps ) {
21
31
const { className, isEnrolled, devices, id, onRemoveU2fDevice, onRenameU2fDevice} =
22
32
props ;
23
33
@@ -37,7 +47,7 @@ function U2fEnrolledDetails(props: any) {
37
47
< EmptyMessage > { t ( 'You have not added any U2F devices' ) } </ EmptyMessage >
38
48
) }
39
49
{ hasDevices &&
40
- devices ?. map ( ( device : any , i : any ) => (
50
+ devices ?. map ( ( device , i ) => (
41
51
< Device
42
52
key = { i }
43
53
device = { device }
@@ -56,7 +66,14 @@ function U2fEnrolledDetails(props: any) {
56
66
) ;
57
67
}
58
68
59
- function Device ( props : any ) {
69
+ interface DeviceProps {
70
+ device : AuthenticatorDevice ;
71
+ isLastDevice : boolean ;
72
+ onRemoveU2fDevice : ( device : AuthenticatorDevice ) => void ;
73
+ onRenameU2fDevice : ( device : AuthenticatorDevice , deviceName : string ) => void ;
74
+ }
75
+
76
+ function Device ( props : DeviceProps ) {
60
77
const { device, isLastDevice, onRenameU2fDevice, onRemoveU2fDevice} = props ;
61
78
const [ deviceName , setDeviceName ] = useState ( device . name ) ;
62
79
const [ isEditing , setEditting ] = useState ( false ) ;
0 commit comments