Added Header, Icon and MessageModal. Refactor screens into directories.

This commit is contained in:
John Lyon-Smith
2018-04-02 13:22:33 -07:00
parent aa622012cd
commit 410d2fde4f
56 changed files with 556 additions and 461 deletions

21
mobile/src/Auth/Logout.js Normal file
View File

@@ -0,0 +1,21 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { api } from '../API'
export class Logout extends Component {
static propTypes = {
history: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
}
componentDidMount(event) {
const cb = () => {
this.props.history.replace('/login')
}
api.logout().then(cb, cb)
}
render() {
return null
}
}