diff --git a/scm-ui/.vscode/settings.json b/scm-ui/.vscode/settings.json index f5d90fdf4b..d5728921ff 100644 --- a/scm-ui/.vscode/settings.json +++ b/scm-ui/.vscode/settings.json @@ -4,7 +4,7 @@ "editor.formatOnSave": false, // Enable per-language "[javascript]": { - "editor.formatOnSave": true + "editor.formatOnSave": false }, "flow.pathToFlow": "${workspaceRoot}/node_modules/.bin/flow" } diff --git a/scm-ui/src/repositories/modules/repositories.js b/scm-ui/src/repositories/modules/repositories.js deleted file mode 100644 index e4ab290a44..0000000000 --- a/scm-ui/src/repositories/modules/repositories.js +++ /dev/null @@ -1,58 +0,0 @@ -const FETCH_REPOSITORIES = 'scm/repositories/FETCH'; -const FETCH_REPOSITORIES_SUCCESS = 'scm/repositories/FETCH_SUCCESS'; -const FETCH_REPOSITORIES_FAILURE = 'scm/repositories/FETCH_FAILURE'; - -function requestRepositories() { - return { - type: FETCH_REPOSITORIES - }; -} - - -function fetchRepositories() { - return function(dispatch) { - dispatch(requestRepositories()); - return null; - } -} - -export function shouldFetchRepositories(state: any): boolean { - const repositories = state.repositories; - return null; -} - -export function fetchRepositoriesIfNeeded() { - return (dispatch, getState) => { - if (shouldFetchRepositories(getState())) { - dispatch(fetchRepositories()); - } - } -} - -export default function reducer(state = {}, action = {}) { - switch (action.type) { - case FETCH_REPOSITORIES: - return { - ...state, - login: true, - error: null - }; - case FETCH_REPOSITORIES_SUCCESS: - return { - ...state, - login: true, - timestamp: action.timestamp, - error: null, - repositories: action.payload - }; - case FETCH_REPOSITORIES_FAILURE: - return { - ...state, - login: true, - error: action.payload - }; - - default: - return state - } -}