From fceade857ecccad6884fe03a973215bd9df1a1e7 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Wed, 16 May 2018 13:53:07 -0400 Subject: simplyfyyyy --- frontend/components/Signup.js | 108 +++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 55 deletions(-) (limited to 'frontend/components/Signup.js') diff --git a/frontend/components/Signup.js b/frontend/components/Signup.js index ef622ed..624bc10 100644 --- a/frontend/components/Signup.js +++ b/frontend/components/Signup.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Mutation, ApolloConsumer } from 'react-apollo'; +import { Mutation } from 'react-apollo'; import { SIGNUP_MUTATION, CURRENT_USER_QUERY } from '../queries/queries.graphql'; import Form from './styles/Form'; import Error from './ErrorMessage'; @@ -18,64 +18,62 @@ class Signup extends Component { render() { return ( - - {client => ( - - {(signup, { loading, error }) => ( -
{ - e.preventDefault(); - const res = await signup(); - // TODO can we return theuser from signup? - client.query({ query: CURRENT_USER_QUERY, fetchPolicy: 'network-only' }); - }} - > -
- -

Sign Up for an Account

- + + {(signup, { loading, error }) => ( + { + e.preventDefault(); + const res = await signup(); + }} + > +
+ +

Sign Up for an Account

+ - + - + - -
- - )} -
+ +
+ )} -
+ ); } } -- cgit v1.3