removing bsid and builData from state

This commit is contained in:
Ayush Kumar Sinha 2019-07-18 00:09:39 +05:30
parent 4d36b0185c
commit 8d638e4f2b
5 changed files with 3 additions and 36 deletions

View File

@ -18,19 +18,8 @@ export const setCommitsError = error => ({
export const loadBuildSets = () => ({
type: BUILD_DATA.LOAD
});
export const setBuildSets = buildSets => ({
type: BUILD_DATA.LOAD_SUCCESS,
buildSets
});
export const setBsID = bsid => ({
type: 'BUILD_SET_ID_SUCCESS',
bsid
});
export const setBuilds = build => ({
type: 'BUILD_ID_LOAD_SUCCESS',
type: BUILD_DATA.LOAD_SUCCESS,
build
});

View File

@ -1,9 +0,0 @@
//handling the buildReq endpoint
const buildSetReducer = (state = [], action) => {
if (action.type === 'BUILD_SET_ID_SUCCESS') {
return [...action.bsid];
}
return state;
};
export default buildSetReducer;

View File

@ -1,6 +1,7 @@
//handling builds endpoint
import { BUILD_DATA } from '../constants';
const buildStatusReducer = (state = [], action) => {
if (action.type === 'BUILD_ID_LOAD_SUCCESS') {
if (action.type === BUILD_DATA.LOAD_SUCCESS) {
return [...action.build];
}
return state;

View File

@ -1,10 +0,0 @@
//handling the buildset endpoint
import { BUILD_DATA } from '../constants';
const buildsReducer = (state = [], action) => {
if (action.type === BUILD_DATA.LOAD_SUCCESS) {
return [...action.buildSets];
}
return state;
};
export default buildsReducer;

View File

@ -8,8 +8,6 @@ import selectedBranchReducer from './selectedBranchReducer';
import pullsReducer from './pullsReducer';
import pageReducer from './pageReducer';
import pullStateReducer from './pullStateReducer';
import buildsReducer from './buildsReducer';
import buildSetReducer from './buildSetReducer';
import buildStatusReducer from './buildStatusReducer';
const rootReducer = combineReducers({
@ -21,8 +19,6 @@ const rootReducer = combineReducers({
pulls: pullsReducer,
pullState: pullStateReducer,
page: pageReducer,
buildData: buildsReducer,
bsid: buildSetReducer,
build: buildStatusReducer
});