Client - store language w/ redux

This commit is contained in:
Sam
2019-09-08 17:14:48 +02:00
parent 6f7f69a807
commit 745d102ee2
4 changed files with 32 additions and 13 deletions

View File

@ -57,6 +57,13 @@ const gpx = (state = initial.gpx, action) => {
return state
}
const language = (state = initial.language, action) => {
if (action.type === 'SET_LANGUAGE') {
return action.language
}
return state
}
const loading = (state = initial.loading, action) => {
if (action.type === 'SET_LOADING') {
return action.loading
@ -124,6 +131,7 @@ export default history =>
calendarActivities,
chartData,
gpx,
language,
loading,
message,
messages,

View File

@ -3,6 +3,7 @@ const emptyData = {
}
export default {
language: 'en',
message: '',
messages: [],
user: {