MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / constructor

Function constructor

src/components/key-backup/BackupKey.js:33–45  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

31
32export default class BackupKey extends React.Component {
33 constructor(props) {
34 super(props);
35 this.state = {
36 waiting: false,
37 terminate: false,
38 action: 'setup',
39 error: null
40 };
41 this.port = EventHandler.connect(`keyBackupDialog-${this.props.id}`, this);
42 this.registerEventListeners();
43 this.port.emit('keybackup-dialog-init');
44 this.handleClick = this.handleClick.bind(this);
45 }
46
47 registerEventListeners() {
48 this.port.on('set-init-data', ({data: {initialSetup}}) => this.setState({action: initialSetup ? 'setup' : 'restore'}));

Callers

nothing calls this directly

Calls 3

connectMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected