File size: 855 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import { localize } from 'i18n-calypso';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { recordGoogleEvent } from '../../state/analytics/actions';
import Security2faKeyItem from './item';
import './style.scss';
function Security2faKeyList( props ) {
return (
<div className="security-2fa-key__active-keys">
<ul className="security-2fa-key__list">
{ props.securityKeys.map( ( securityKey ) => (
<li key={ securityKey.id } className="security-2fa-key__list-item">
<Security2faKeyItem securityKey={ securityKey } onDelete={ props.onDelete } />
</li>
) ) }
</ul>
</div>
);
}
Security2faKeyList.propTypes = {
securityKeys: PropTypes.array.isRequired,
onDelete: PropTypes.func.isRequired,
};
export default connect( null, {
recordGoogleEvent,
} )( localize( Security2faKeyList ) );
|