add generalReducer to store settings

This commit is contained in:
Delucse
2020-12-14 13:06:55 +01:00
parent 7d1d2409e4
commit e52e3943c1
14 changed files with 360 additions and 170 deletions
+22 -1
View File
@@ -1,4 +1,4 @@
import { VISIT } from './types';
import { VISIT, LANGUAGE, RENDERER, STATISTICS } from './types';
export const visitPage = () => (dispatch) => {
@@ -6,3 +6,24 @@ export const visitPage = () => (dispatch) => {
type: VISIT
});
};
export const setLanguage = (language) => (dispatch) => {
dispatch({
type: LANGUAGE,
payload: language
});
};
export const setRenderer = (renderer) => (dispatch) => {
dispatch({
type: RENDERER,
payload: renderer
});
};
export const setStatistics = (showStatistics) => (dispatch) => {
dispatch({
type: STATISTICS,
payload: showStatistics
});
};