diff options
Diffstat (limited to 'src/settings/index.js')
-rw-r--r-- | src/settings/index.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/settings/index.js b/src/settings/index.js new file mode 100644 index 0000000..c8d6cc4 --- /dev/null +++ b/src/settings/index.js @@ -0,0 +1,15 @@ +import './site.scss'; +import SettingComponent from 'settings/components/setting'; +import settingReducer from 'settings/reducers/setting'; +import { createStore } from 'shared/store'; + +const store = createStore(settingReducer); +let settingComponent = null; + +store.subscribe(() => { + settingComponent.update(); +}); + +document.addEventListener('DOMContentLoaded', () => { + settingComponent = new SettingComponent(document.body, store); +}); |