mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-30 16:57:44 +01:00
18 lines
372 B
JavaScript
18 lines
372 B
JavaScript
import { createSlice } from '@reduxjs/toolkit';
|
|
import { getItem } from 'lib/web';
|
|
|
|
const app = createSlice({
|
|
name: 'app',
|
|
initialState: { locale: getItem('umami.locale') || 'en-US' },
|
|
reducers: {
|
|
updateApp(state, action) {
|
|
state = action.payload;
|
|
return state;
|
|
},
|
|
},
|
|
});
|
|
|
|
export const { updateApp } = app.actions;
|
|
|
|
export default app.reducer;
|