'use strict'; import { h, render, Component } from 'preact'; import Client from '../lib/client.js'; class LoginForm extends Component { constructor(props) { super(props) this.handleSubmit = this.handleSubmit.bind(this); this.state = { email: '', password: '', } } handleSubmit(e) { e.preventDefault(); Client.request('session', { method: "POST", data: { email: this.state.email, password: this.state.password, } }).then((r) => { this.props.onSuccess() }) } render() { return (

Login

Please enter your credentials to access your Ana dashboard.

) } } export default LoginForm