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