Add settings UI
Summary: Adds a simple UI for editing settings, a reducer and persistance config for the data. These values aren't yet used for anything. Reviewed By: passy Differential Revision: D17684490 fbshipit-source-id: e76ac43ffa17d3606e59f4a1ccb940e8d9fbd9e8
This commit is contained in:
committed by
Facebook Github Bot
parent
8c15547597
commit
eb64ff0832
@@ -26,6 +26,10 @@ import plugins, {
|
||||
State as PluginsState,
|
||||
Action as PluginsAction,
|
||||
} from './plugins';
|
||||
import settings, {
|
||||
State as SettingsState,
|
||||
Action as SettingsAction,
|
||||
} from './settings';
|
||||
import user, {State as UserState, Action as UserAction} from './user';
|
||||
|
||||
import {persistReducer, PersistPartial} from 'redux-persist';
|
||||
@@ -41,6 +45,7 @@ export type Actions =
|
||||
| NotificationsAction
|
||||
| PluginsAction
|
||||
| UserAction
|
||||
| SettingsAction
|
||||
| {type: 'INIT'};
|
||||
|
||||
export type State = {
|
||||
@@ -50,6 +55,7 @@ export type State = {
|
||||
notifications: NotificationsState & PersistPartial;
|
||||
plugins: PluginsState;
|
||||
user: UserState & PersistPartial;
|
||||
settingsState: SettingsState & PersistPartial;
|
||||
};
|
||||
|
||||
export type Store = ReduxStore<State, Actions>;
|
||||
@@ -94,4 +100,8 @@ export default combineReducers<State, Actions>({
|
||||
},
|
||||
user,
|
||||
),
|
||||
settingsState: persistReducer(
|
||||
{key: 'settings', storage, whitelist: ['settings']},
|
||||
settings,
|
||||
),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user