Remove unused code
This commit is contained in:
parent
9b56b2eddb
commit
6aeb97ae99
21
js/api.js
21
js/api.js
|
|
@ -274,27 +274,6 @@ const reducer_userinfo = (state = defaultstate_userinfo, action) => {
|
|||
expiry : null,
|
||||
uid : null
|
||||
});
|
||||
case actiontypes_userinfo.GET_TOURNAMENT_LIST:
|
||||
getRequest(action.state, '/tournaments?type=' + action.parameters.type).then((resp) => {
|
||||
__store.dispatch({
|
||||
type: actiontypes_tournamentinfo.GET_TOURNAMENT_LIST_SUCCESS,
|
||||
parameters: resp
|
||||
});
|
||||
storeOptionalToken(resp);
|
||||
action.parameters.successCallback();
|
||||
}).catch((error) => {
|
||||
__store.dispatch({
|
||||
type: actiontypes_tournamentinfo.GET_TOURNAMENT_LIST_ERROR,
|
||||
parameters: {error: error}
|
||||
});
|
||||
storeOptionalToken(error.response);
|
||||
action.parameters.errorCallback();
|
||||
});
|
||||
return Object.assign({}, state, {});
|
||||
case actiontypes_userinfo.GET_TOURNAMENT_LIST_ERROR:
|
||||
return Object.assign({}, state, {});
|
||||
case actiontypes_userinfo.GET_TOURNAMENT_LIST_SUCCESS:
|
||||
return Object.assign({}, state, {...action.parameters});
|
||||
default: return state;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -85,23 +85,6 @@ class PrivateTournamentsListCard extends React.Component {
|
|||
error
|
||||
});
|
||||
});
|
||||
/*
|
||||
getRequest(getState(), '/tournaments?type=private')
|
||||
.then(
|
||||
response => {
|
||||
this.setState({
|
||||
isLoaded: true,
|
||||
items: response.data
|
||||
});
|
||||
},
|
||||
error => {
|
||||
this.setState({
|
||||
isLoaded: true,
|
||||
error
|
||||
});
|
||||
}
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue