content: import React from 'react';
  import Form from './Form';
  import Input from './Input';
  import Button from './Button';
  import Parse from 'parse';
  import { withRouter } from 'react-router';
  
  const Signin = ({ router }) => {
  
    const handleSubmit = (event) => {
      event.preventDefault();
      const { username, password } = event.target;
  
      Parse.User.logIn(username.value, password.value, {
        success: (user) => router.push('/'),
        error: (user, error) => console.log(`Error: ${error.code} ${error.message}`),
      });
    };
  
    return (
      <Form onSubmit={handleSubmit}>
        <h3>Sign In</h3>
        <p><Input name="username" type="text" placeholder="Username" required/></p>
        <p><Input name="password" type="password" placeholder="Password" required/></p>
        <Button type="submit" primary>Sign In</Button>
      </Form>
    );
  };
  Signin.propTypes = {};
  Signin.defaultProps = {};
  
  export default withRouter(Signin);
  