diff --git a/common/components/AlphaAgreement/index.jsx b/common/components/AlphaAgreement/index.jsx new file mode 100644 index 00000000..526fcaf6 --- /dev/null +++ b/common/components/AlphaAgreement/index.jsx @@ -0,0 +1,76 @@ +import React from 'react'; +import './index.scss'; + +const LS_KEY = 'acknowledged-alpha'; + +export default class AlphaAgreement extends React.Component { + state = { + isFading: false, + hasAcknowledged: false + }; + + constructor(props) { + super(props); + + this.state = { + hasAcknowledged: localStorage.getItem(LS_KEY), + isFading: false + }; + } + + _continue = () => { + localStorage.setItem(LS_KEY, true); + this.setState({ isFading: true }); + + setTimeout(() => { + this.setState({ hasAcknowledged: true }); + }, 1000); + }; + + _reject = () => { + window.location = 'https://myetherwallet.com'; + }; + + render() { + if (this.state.hasAcknowledged) { + return null; + } + + const isFading = this.state.isFading ? 'is-fading' : ''; + + return ( +
+ You are about to access an alpha version of MyEtherWallet that is + currently in development. In its current state, it should only be + used for testing, not for important transactions. +
++ Any wallets you generate should not hold a significant value, and + any transactions you make should be for small amounts. MEW does not + claim responsibility for any issues that happen while using the + alpha version. +
+Are you sure you would like to continue?
+ +