aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth/Signup.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/auth/Signup.js')
-rw-r--r--src/components/auth/Signup.js25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/components/auth/Signup.js b/src/components/auth/Signup.js
index 6526264e0..00b387b25 100644
--- a/src/components/auth/Signup.js
+++ b/src/components/auth/Signup.js
@@ -6,7 +6,6 @@ import { defineMessages, injectIntl } from 'react-intl';
6 6
7import Form from '../../lib/Form'; 7import Form from '../../lib/Form';
8import { required, email, minLength } from '../../helpers/validation-helpers'; 8import { required, email, minLength } from '../../helpers/validation-helpers';
9import serverlessLogin from '../../helpers/serverless-helpers';
10import Input from '../ui/Input'; 9import Input from '../ui/Input';
11import Button from '../ui/Button'; 10import Button from '../ui/Button';
12import Link from '../ui/Link'; 11import Link from '../ui/Link';
@@ -59,14 +58,6 @@ const messages = defineMessages({
59 id: 'signup.link.login', 58 id: 'signup.link.login',
60 defaultMessage: 'Already have an account, sign in?', 59 defaultMessage: 'Already have an account, sign in?',
61 }, 60 },
62 changeServer: {
63 id: 'login.changeServer',
64 defaultMessage: 'Change server',
65 },
66 serverless: {
67 id: 'services.serverless',
68 defaultMessage: 'Use Ferdi without an Account',
69 },
70 emailDuplicate: { 61 emailDuplicate: {
71 id: 'signup.emailDuplicate', 62 id: 'signup.emailDuplicate',
72 defaultMessage: 'A user with that email address already exists', 63 defaultMessage: 'A user with that email address already exists',
@@ -78,9 +69,7 @@ class Signup extends Component {
78 onSubmit: PropTypes.func.isRequired, 69 onSubmit: PropTypes.func.isRequired,
79 isSubmitting: PropTypes.bool.isRequired, 70 isSubmitting: PropTypes.bool.isRequired,
80 loginRoute: PropTypes.string.isRequired, 71 loginRoute: PropTypes.string.isRequired,
81 changeServerRoute: PropTypes.string.isRequired,
82 error: globalErrorPropType.isRequired, 72 error: globalErrorPropType.isRequired,
83 actions: PropTypes.object.isRequired,
84 }; 73 };
85 74
86 form = new Form( 75 form = new Form(
@@ -122,14 +111,10 @@ class Signup extends Component {
122 }); 111 });
123 } 112 }
124 113
125 useLocalServer() {
126 serverlessLogin(this.props.actions);
127 }
128
129 render() { 114 render() {
130 const { form } = this; 115 const { form } = this;
131 const { intl } = this.props; 116 const { intl } = this.props;
132 const { isSubmitting, loginRoute, error, changeServerRoute } = this.props; 117 const { isSubmitting, loginRoute, error } = this.props;
133 118
134 return ( 119 return (
135 <div className="auth__scroll-container"> 120 <div className="auth__scroll-container">
@@ -138,7 +123,7 @@ class Signup extends Component {
138 className="franz-form auth__form" 123 className="franz-form auth__form"
139 onSubmit={e => this.submit(e)} 124 onSubmit={e => this.submit(e)}
140 > 125 >
141 <img src="./assets/images/logo.svg" className="auth__logo" alt="" /> 126 <Link to='/auth/welcome'><img src="./assets/images/logo.svg" className="auth__logo" alt="" /></Link>
142 <h1>{intl.formatMessage(messages.headline)}</h1> 127 <h1>{intl.formatMessage(messages.headline)}</h1>
143 <div className="grid__row"> 128 <div className="grid__row">
144 <Input field={form.$('firstname')} focus /> 129 <Input field={form.$('firstname')} focus />
@@ -191,12 +176,6 @@ class Signup extends Component {
191 </p> 176 </p>
192 </form> 177 </form>
193 <div className="auth__links"> 178 <div className="auth__links">
194 <Link to={changeServerRoute}>
195 {intl.formatMessage(messages.changeServer)}
196 </Link>
197 <a onClick={this.useLocalServer.bind(this)}>
198 {intl.formatMessage(messages.serverless)}
199 </a>
200 <Link to={loginRoute}> 179 <Link to={loginRoute}>
201 {intl.formatMessage(messages.loginLink)} 180 {intl.formatMessage(messages.loginLink)}
202 </Link> 181 </Link>