From a17b76ac75f506f5da6fe8adf9c36632b60d4226 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 26 Sep 2020 14:56:02 +0200 Subject: refactor to use app-rooted js imports --- frontend/app/views/site/site.reducer.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 frontend/app/views/site/site.reducer.js (limited to 'frontend/app/views/site/site.reducer.js') diff --git a/frontend/app/views/site/site.reducer.js b/frontend/app/views/site/site.reducer.js new file mode 100644 index 0000000..b40d6f1 --- /dev/null +++ b/frontend/app/views/site/site.reducer.js @@ -0,0 +1,19 @@ +import * as types from 'app/types' + +const initialState = { + 'siteTitle': 'swimmer', +} + +export default function graphReducer(state = initialState, action) { + // console.log(action.type, action) + switch (action.type) { + case types.site.set_site_title: + return { + ...state, + siteTitle: action.payload, + } + + default: + return state + } +} -- cgit v1.2.3-70-g09d2