adding more fields to torrentlist, ul speed/dl speed
enter the commit message for your changes. Lines starting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export const SORTLIST = 'SORTLIST';
|
||||
export const CHANGE_SELECTION = 'CHANGE_SELECTION';
|
||||
export const CHANGE_FILTER = 'CHANGE_FILTER';
|
||||
|
||||
|
@@ -6,20 +6,33 @@ const initialState = {
|
||||
buttonState: "default",
|
||||
sorting: [],
|
||||
selection: [],
|
||||
filter: ["Status", ""],
|
||||
columnName: "Status"
|
||||
}
|
||||
|
||||
const reducer = (state = initialState, action) => {
|
||||
switch(action.type){
|
||||
|
||||
case actionTypes.CHANGE_SELECTION:
|
||||
console.log("Selection change", action.selection)
|
||||
return state;
|
||||
console.log("Change Selection", action.selection)
|
||||
return {
|
||||
...state,
|
||||
selection: action.selection,
|
||||
};
|
||||
|
||||
case actionTypes.SORTLIST:
|
||||
console.log("List Sort", action.sorting)
|
||||
return state;
|
||||
|
||||
case actionTypes.CHANGE_FILTER:
|
||||
return {
|
||||
...state,
|
||||
filter: action.filter
|
||||
}
|
||||
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
};
|
||||
|
||||
console.log("no actiontypes found", action)
|
||||
return state;
|
||||
|
Reference in New Issue
Block a user