Rearrange app directory structure

This commit is contained in:
John Furrow
2015-11-07 23:13:21 -08:00
parent 072c000236
commit eb1ea0806d
91 changed files with 488 additions and 2975 deletions

View File

@@ -0,0 +1,42 @@
const initialState = {
transfers: {
updatedAt: 0,
download: {
rate: 0,
total: 0
},
upload: {
rate: 0,
total: 0
}
}
};
export default function clientReducer(state = initialState, action) {
switch (action.type) {
case 'CLIENT_RECEIVE_TRANSFER_DATA':
return Object.assign(
{},
state,
{
...state,
transfers: {
...state.transfers,
updatedAt: Date.now(),
download: {
rate: action.payload.downloadRate,
total: action.payload.downloadTotal
},
upload: {
rate: action.payload.uploadRate,
total: action.payload.uploadTotal
}
}
}
);
default:
return state;
}
}