Updated list servers action so that it tries to fetch servers from the servers.json file when no local servers are found

This commit is contained in:
Alejandro Celaya
2019-04-28 12:07:09 +02:00
parent 502c8a7e02
commit 20820c47d4
9 changed files with 74 additions and 48 deletions

View File

@@ -10,10 +10,10 @@ const initialState = null;
export const resetSelectedServer = createAction(RESET_SELECTED_SERVER);
export const selectServer = (serversService) => (serverId) => (dispatch) => {
export const selectServer = ({ findServerById }) => (serverId) => (dispatch) => {
dispatch(resetShortUrlParams());
const selectedServer = serversService.findServerById(serverId);
const selectedServer = findServerById(serverId);
dispatch({
type: SELECT_SERVER,