Moved all reducers and actions to their own folders
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { ALBUM_MODE_GRID, ALBUM_MODE_LIST } from '../actions'
|
||||
|
||||
export const albumViewReducer = (
|
||||
previousState = {
|
||||
grid: true,
|
||||
},
|
||||
payload
|
||||
) => {
|
||||
const { type } = payload
|
||||
switch (type) {
|
||||
case ALBUM_MODE_GRID:
|
||||
case ALBUM_MODE_LIST:
|
||||
return { ...previousState, grid: type === ALBUM_MODE_GRID }
|
||||
default:
|
||||
return previousState
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user