aboutsummaryrefslogtreecommitdiff
path: root/src/settings/reducers
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-10-07 12:54:32 +0000
committerGitHub <noreply@github.com>2019-10-07 12:54:32 +0000
commit8eddcc1785a85bbe74be254d1055ebe5125dad10 (patch)
treef3f51320d12a90a1b421ed8b1f811c576996ea8e /src/settings/reducers
parent7fc2bb615f530fc6adfade54b9553568f5d50ceb (diff)
parentb77a4734985722e96066e713f3b1b9e81a6e1811 (diff)
Merge pull request #654 from ueokande/settings-as-a-class
Refactor settings on shared logics
Diffstat (limited to 'src/settings/reducers')
-rw-r--r--src/settings/reducers/setting.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/settings/reducers/setting.ts b/src/settings/reducers/setting.ts
index c4a21c7..804853f 100644
--- a/src/settings/reducers/setting.ts
+++ b/src/settings/reducers/setting.ts
@@ -1,18 +1,20 @@
import * as actions from '../actions';
import {
- JSONSettings, FormSettings, SettingSource,
+ JSONTextSettings, FormSettings, SettingSource,
} from '../../shared/SettingData';
+import { DefaultSetting } from '../../shared/settings/Settings';
export interface State {
source: SettingSource;
- json?: JSONSettings;
+ json?: JSONTextSettings;
form?: FormSettings;
error: string;
}
const defaultState: State = {
source: SettingSource.JSON,
- json: JSONSettings.valueOf(''),
+ json: JSONTextSettings.fromText(''),
+ form: FormSettings.fromSettings(DefaultSetting),
error: '',
};