2017-09-27 02:33:08 +08:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2017-09-27 02:46:00 +08:00
|
|
|
import { RetinaImg } from 'mailspring-component-kit';
|
2017-09-27 02:33:08 +08:00
|
|
|
import AccountProviders from './account-providers';
|
2017-01-24 23:34:07 +08:00
|
|
|
|
2017-09-27 02:33:08 +08:00
|
|
|
class AccountOnboardingSuccess extends Component {
|
|
|
|
// eslint-disable-line
|
|
|
|
static displayName = 'AccountOnboardingSuccess';
|
2017-01-24 23:34:07 +08:00
|
|
|
|
|
|
|
static propTypes = {
|
2017-09-11 13:45:48 +08:00
|
|
|
account: PropTypes.object,
|
2017-09-27 02:33:08 +08:00
|
|
|
};
|
2017-01-24 23:34:07 +08:00
|
|
|
|
|
|
|
render() {
|
2017-09-27 02:33:08 +08:00
|
|
|
const { account } = this.props;
|
|
|
|
const providerConfig = AccountProviders.find(({ provider }) => provider === account.provider);
|
2017-09-11 13:45:48 +08:00
|
|
|
|
2017-01-24 23:34:07 +08:00
|
|
|
return (
|
|
|
|
<div className={`page account-setup AccountOnboardingSuccess`}>
|
|
|
|
<div className="logo-container">
|
|
|
|
<RetinaImg
|
2017-09-27 02:33:08 +08:00
|
|
|
style={{ backgroundColor: providerConfig.color, borderRadius: 44 }}
|
2017-09-11 13:45:48 +08:00
|
|
|
name={providerConfig.headerIcon}
|
2017-01-24 23:34:07 +08:00
|
|
|
mode={RetinaImg.Mode.ContentPreserve}
|
|
|
|
className="logo"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div>
|
2017-09-11 13:45:48 +08:00
|
|
|
<h2>Successfully connected to {providerConfig.displayName}!</h2>
|
2017-09-06 04:37:40 +08:00
|
|
|
<h3>Adding your account to Mailspring…</h3>
|
2017-01-24 23:34:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-27 02:33:08 +08:00
|
|
|
);
|
2017-01-24 23:34:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-27 02:33:08 +08:00
|
|
|
export default AccountOnboardingSuccess;
|