diff --git a/js/api.js b/js/api.js index a4ab3d3..88a9795 100644 --- a/js/api.js +++ b/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; } }; diff --git a/pages/private.js b/pages/private.js index 8d732b1..1d6c20c 100644 --- a/pages/private.js +++ b/pages/private.js @@ -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() {