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,
|
expiry : null,
|
||||||
uid : 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;
|
default: return state;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -85,23 +85,6 @@ class PrivateTournamentsListCard extends React.Component {
|
||||||
error
|
error
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
getRequest(getState(), '/tournaments?type=private')
|
|
||||||
.then(
|
|
||||||
response => {
|
|
||||||
this.setState({
|
|
||||||
isLoaded: true,
|
|
||||||
items: response.data
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error => {
|
|
||||||
this.setState({
|
|
||||||
isLoaded: true,
|
|
||||||
error
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue