summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/editor/media/media.reducer.js
blob: f13f9de0501fd3174fc673b810e9b36f97c11e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import * as types from 'app/types'
import { session, getDefault, getDefaultInt } from 'app/session'

import { crudState, crudReducer } from 'app/api/crud.reducer'

const initialState = crudState('media', {
  options: {
    sort: 'author asc',
    thumbnailSize: getDefault('upload.thumbnailSize', 'small'),
  }
})

const reducer = crudReducer('media')

export default function mediaReducer(state = initialState, action) {
  // console.log(action.type, action)
  state = reducer(state, action)
  switch (action.type) {
    default:
      return state
  }
}