File size: 1,262 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import debugFactory from 'debug';
import { localize } from 'i18n-calypso';
import { Component } from 'react';

import './style.scss';

const debug = debugFactory( 'calypso:me:security:2fa-status' );

class Security2faStatus extends Component {
	static displayName = 'Security2faStatus';

	componentDidMount() {
		debug( this.constructor.displayName + ' React component is mounted.' );
	}

	componentWillUnmount() {
		debug( this.constructor.displayName + ' React component will unmount.' );
	}

	render() {
		return (
			<p>
				{ this.props.twoStepEnabled
					? this.props.translate(
							'{{status}}Status:{{/status}} Two-step authentication is currently {{onOff}}on{{/onOff}}.',
							{
								components: {
									status: <span className="security-2fa-status__heading" />,
									onOff: <span className="security-2fa-status__on" />,
								},
							}
					  )
					: this.props.translate(
							'{{status}}Status:{{/status}} Two-step authentication is currently {{onOff}}off{{/onOff}}.',
							{
								components: {
									status: <span className="security-2fa-status__heading" />,
									onOff: <span className="security-2fa-status__off" />,
								},
							}
					  ) }
			</p>
		);
	}
}

export default localize( Security2faStatus );