2017-08-28 19:09:42 +00:00
|
|
|
import React from 'react';
|
|
|
|
import './index.scss';
|
|
|
|
|
|
|
|
const LS_KEY = 'acknowledged-alpha';
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
interface State {
|
|
|
|
isFading: boolean;
|
|
|
|
hasAcknowledged: boolean;
|
|
|
|
}
|
2018-01-29 19:13:46 +00:00
|
|
|
export default class AlphaAgreement extends React.PureComponent<{}, State> {
|
2017-09-25 02:06:28 +00:00
|
|
|
public state = {
|
|
|
|
hasAcknowledged: !!localStorage.getItem(LS_KEY),
|
|
|
|
isFading: false
|
2017-08-28 19:09:42 +00:00
|
|
|
};
|
|
|
|
|
2017-09-25 02:06:28 +00:00
|
|
|
public render() {
|
2017-08-28 19:09:42 +00:00
|
|
|
if (this.state.hasAcknowledged) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
const isFading = this.state.isFading ? 'is-fading' : '';
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={`AlphaAgreement ${isFading}`}>
|
|
|
|
<div className="AlphaAgreement-content">
|
2018-02-07 04:28:28 +00:00
|
|
|
<h2>This is an Unstable Version of MyCrypto</h2>
|
2017-08-28 19:09:42 +00:00
|
|
|
<p>
|
2018-02-07 04:28:28 +00:00
|
|
|
You are about to access an alpha version of MyCrypto that is currently in development.
|
|
|
|
In its current state, it should only be used for testing, not for important
|
2017-12-18 23:29:26 +00:00
|
|
|
transactions.
|
2017-08-28 19:09:42 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2017-12-18 23:29:26 +00:00
|
|
|
Any wallets you generate should not hold a significant value, and any transactions you
|
2018-02-07 04:28:28 +00:00
|
|
|
make should be for small amounts. MyCrypto does not claim responsibility for any issues
|
|
|
|
that happen while using the alpha version.
|
2017-08-28 19:09:42 +00:00
|
|
|
</p>
|
|
|
|
<p>Are you sure you would like to continue?</p>
|
|
|
|
|
|
|
|
<div className="AlphaAgreement-content-buttons">
|
2017-12-18 23:29:26 +00:00
|
|
|
<button className="AlphaAgreement-content-buttons-btn is-reject" onClick={this.reject}>
|
2017-08-28 19:09:42 +00:00
|
|
|
No, Take Me to v3
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
className="AlphaAgreement-content-buttons-btn is-continue"
|
2017-09-25 02:06:28 +00:00
|
|
|
onClick={this.doContinue}
|
2017-08-28 19:09:42 +00:00
|
|
|
>
|
|
|
|
Yes, Continue to v4
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2017-09-25 02:06:28 +00:00
|
|
|
|
|
|
|
private doContinue = () => {
|
|
|
|
localStorage.setItem(LS_KEY, 'true');
|
|
|
|
this.setState({ isFading: true });
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
this.setState({ hasAcknowledged: true });
|
|
|
|
}, 1000);
|
|
|
|
};
|
|
|
|
|
|
|
|
private reject = () => {
|
2018-02-07 04:28:28 +00:00
|
|
|
window.location.assign('https://mycrypto.com');
|
2017-09-25 02:06:28 +00:00
|
|
|
};
|
2017-08-28 19:09:42 +00:00
|
|
|
}
|