Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const container = compose(
- graphql(LOGIN_MUTATION, {
- props: ({ mutate, ownProps }) => ({
- login: input =>
- mutate({
- variables: {
- input,
- },
- })
- .then(data => {
- console.log('data', data);
- if (data.loginResponse) {
- ownProps.history.push('/repositories');
- } else {
- return '!!!!!!!!!!';
- }
- })
- .catch(mapRej(selectErrors)),
- }),
- }),
- withForm({
- handleSubmit: (values, { props, setSubmitting, setStatus }) => {
- props.login(values);
- },
- mapPropsToValues: props => ({
- username: props.username,
- password: props.password,
- }),
- })
- );
- type Props = {
- handleSubmit: Function,
- };
- const LoginScene = (props: Props) => (
Advertisement
Add Comment
Please, Sign In to add comment