Newer
Older
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
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: MIT
import React, { PureComponent } from 'react';
import { accounts$ } from '@parity/light.js';
import { inject } from 'mobx-react';
import { Link } from 'react-router-dom';
import Health from '../Health';
import light from '../hoc';
@light({
accounts: accounts$
})
@inject('firstRunStore')
class Onboarding extends PureComponent {
handleFirstRun = () => {
// Not first run anymore after clicking Start
this.props.firstRunStore.setIsFirstRun(false);
};
render () {
const { accounts } = this.props;
return (
<div>
This is the onboarding page.<br />
{accounts && accounts.length ? (
<Link onClick={this.handleFirstRun} to='/'>
Start
</Link>
) : (
<Link to='/accounts/new'>Create account</Link>
)}
<Health />
</div>
);
}
}
export default Onboarding;