From b1600adec47a04f60e1da07d94a3ed3906ff5aee Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 14 Jun 2018 16:44:21 -0400 Subject: starter files --- frontend/components/Signup.js | 93 ------------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 frontend/components/Signup.js (limited to 'frontend/components/Signup.js') diff --git a/frontend/components/Signup.js b/frontend/components/Signup.js deleted file mode 100644 index 9164e67..0000000 --- a/frontend/components/Signup.js +++ /dev/null @@ -1,93 +0,0 @@ -import React, { Component } from 'react'; -import { Mutation } from 'react-apollo'; -import gql from 'graphql-tag'; -import { CURRENT_USER_QUERY } from './User'; -import Form from './styles/Form'; -import Error from './ErrorMessage'; - -const SIGNUP_MUTATION = gql` - mutation SIGNUP_MUTATION($email: String!, $name: String!, $password: String!) { - signup(email: $email, name: $name, password: $password) { - id - email - name - } - } -`; - -class Signup extends Component { - state = { - email: '', - name: '', - password: '', - }; - - saveToState = e => { - const { name, value } = e.target; - this.setState({ [name]: value }); - }; - - render() { - return ( - - {(signup, { loading, error }) => ( -
{ - e.preventDefault(); - const res = await signup(); - }} - > -
- -

Sign Up for an Account

- - - - - - - -
-
- )} -
- ); - } -} - -export default Signup; -export { SIGNUP_MUTATION }; -- cgit v1.3