mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-06 20:43:13 +08:00
Created config global state. Reworked WeatherSettings and WeatherWidget to use new config state.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { BrowserRouter, Route, Switch } from 'react-router-dom';
|
||||
import { setTheme } from './store/actions';
|
||||
import { getConfig, setTheme } from './store/actions';
|
||||
|
||||
// Redux
|
||||
import store from './store/store';
|
||||
import { store } from './store/store';
|
||||
import { Provider } from 'react-redux';
|
||||
|
||||
import classes from './App.module.css';
|
||||
@@ -13,6 +13,9 @@ import Settings from './components/Settings/Settings';
|
||||
import Bookmarks from './components/Bookmarks/Bookmarks';
|
||||
import NotificationCenter from './components/NotificationCenter/NotificationCenter';
|
||||
|
||||
// Get config pairs from database
|
||||
store.dispatch<any>(getConfig());
|
||||
|
||||
if (localStorage.theme) {
|
||||
store.dispatch<any>(setTheme(localStorage.theme));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user