Updated profile settings. Refactored locale saving.

This commit is contained in:
Mike Cao 2020-09-17 00:17:11 -07:00
parent 814589f6a5
commit 7f598fa84d
9 changed files with 82 additions and 30 deletions

View file

@ -1,8 +1,9 @@
import { createSlice } from '@reduxjs/toolkit';
import { getItem } from 'lib/web';
const app = createSlice({
name: 'app',
initialState: { locale: 'en-US' },
initialState: { locale: getItem('umami.locale') || 'en-US' },
reducers: {
updateApp(state, action) {
state = action.payload;