2016-10-27 09:02:41 -07:00
|
|
|
const LoginForm = {
|
|
|
|
data: () => ({
|
|
|
|
user: {}
|
|
|
|
}),
|
|
|
|
computed: {
|
|
|
|
loggingIn () { return this.$store.state.users.loggingIn }
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
submit () {
|
2016-10-30 06:25:18 -07:00
|
|
|
this.$store.dispatch('loginUser', this.user).then(() => {
|
|
|
|
this.$router.push('/main/friends')
|
|
|
|
})
|
2016-10-27 09:02:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default LoginForm
|