mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
Support i18n.
This commit is contained in:
parent
f0ac9b6522
commit
e8538f6e23
14 changed files with 372 additions and 36 deletions
16
redux/actions/app.js
Normal file
16
redux/actions/app.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
const app = createSlice({
|
||||
name: 'app',
|
||||
initialState: { locale: 'en' },
|
||||
reducers: {
|
||||
updateApp(state, action) {
|
||||
state = action.payload;
|
||||
return state;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { updateApp } = app.actions;
|
||||
|
||||
export default app.reducer;
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { combineReducers } from 'redux';
|
||||
import app from './actions/app';
|
||||
import user from './actions/user';
|
||||
import websites from './actions/websites';
|
||||
import queries from './actions/queries';
|
||||
|
||||
export default combineReducers({ user, websites, queries });
|
||||
export default combineReducers({ app, user, websites, queries });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue