Skip to content

Commit cf728e1

Browse files
author
Tian, ShaoQin
committed
rename signoutUser to logout
1 parent 913b27a commit cf728e1

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

client/src/modules/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ export default function authReducer(state = {authenticated: false, token: null},
2020
}
2121
}
2222

23-
export const signoutUser = () => {
23+
export const logout = () => {
2424
return ({type: REQUEST_LOGOUT});
2525
}

client/src/modules/user.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import update from 'immutability-helper';
44
export const FETCH_ME = 'FETCH_ME'
55
export const UPDATE_ME = 'UPDATE_ME'
66
export const CLEAR_USER = 'CLEAR_USER'
7-
export const CLEAR_MSG = 'CLEAR_MSG'
87
export const CHANGE_PASSWORD = 'CHANGE_PASSWORD'
98

109
export default function userReducer(state = {user: null, loading: false}, action) {

client/src/views/Pages/Logout/Logout.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component } from 'react'
22
import { connect } from 'react-redux'
3-
import { signoutUser } from '../../../modules/auth'
3+
import { logout } from '../../../modules/auth'
44
import { bindActionCreators, compose } from 'redux'
55
import { withApollo } from 'react-apollo';
66
import injectSaga from '../../../utils/injectSaga';
@@ -9,7 +9,7 @@ import saga from './saga'
99
class Signout extends Component {
1010

1111
componentWillMount() {
12-
this.props.signoutUser();
12+
this.props.logout();
1313
this.props.client.resetStore().then(() => console.log('apollo reset'))
1414
}
1515

@@ -21,7 +21,7 @@ class Signout extends Component {
2121
const mapDispatchToProps = dispatch =>
2222
bindActionCreators(
2323
{
24-
signoutUser
24+
logout
2525
},
2626
dispatch
2727
)

0 commit comments

Comments
 (0)