From ef78bc6a084f92b4794e987b5832240d85b6479e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 22 Jul 2020 14:05:15 +0200 Subject: refactor app using babel module-resolver --- .../app/views/annotation/annotation.reducer.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 animism-align/frontend/app/views/annotation/annotation.reducer.js (limited to 'animism-align/frontend/app/views/annotation') diff --git a/animism-align/frontend/app/views/annotation/annotation.reducer.js b/animism-align/frontend/app/views/annotation/annotation.reducer.js new file mode 100644 index 0000000..50232a9 --- /dev/null +++ b/animism-align/frontend/app/views/annotation/annotation.reducer.js @@ -0,0 +1,20 @@ +import * as types from 'app/types' + +import { crudState, crudReducer } from 'app/api/crud.reducer' + +const initialState = crudState('annotation', { + options: { + sort: 'start_ts asc', + } +}) + +const reducer = crudReducer('annotation') + +export default function annotationReducer(state = initialState, action) { + // console.log(action.type, action) + state = reducer(state, action) + switch (action.type) { + default: + return state + } +} -- cgit v1.2.3-70-g09d2