@@ -5,8 +5,6 @@ import { Row, Col, Select } from 'antd';
5
5
import { CheckboxInput , ListInput , SliderInput , SwitchInput } from '../../shared/inputs' ;
6
6
import { getDefined } from '../../../util/properties-type-guards' ;
7
7
import { ObsSettingsSection } from './ObsSettings' ;
8
- import * as remote from '@electron/remote' ;
9
- import { injectFormBinding , useModule } from 'slap' ;
10
8
import { ENavName , EMenuItemKey , IAppMenuItem , menuTitles } from 'services/side-nav' ;
11
9
import { useVuex } from 'components-react/hooks' ;
12
10
import styles from './Appearance.m.less' ;
@@ -16,6 +14,7 @@ import Scrollable from 'components-react/shared/Scrollable';
16
14
import UltraIcon from 'components-react/shared/UltraIcon' ;
17
15
import { CustomizationState } from 'services/customization' ;
18
16
import { useRealmObject } from 'components-react/hooks/realm' ;
17
+ import { bindFormState } from 'components-react/shared/inputs' ;
19
18
20
19
const { Option } = Select ;
21
20
@@ -33,17 +32,10 @@ export function AppearanceSettings() {
33
32
// Hooks up reactivity for Customization state
34
33
useRealmObject ( CustomizationService . state ) ;
35
34
36
- const { bind } = useModule ( ( ) => {
37
- function getSettings ( ) {
38
- return CustomizationService . state . toObject ( ) as CustomizationState ;
39
- }
40
-
41
- function setSettings ( newSettings : CustomizationState ) {
42
- CustomizationService . actions . setSettings ( newSettings as any ) ;
43
- }
44
-
45
- return { bind : injectFormBinding ( getSettings , setSettings ) } ;
46
- } ) ;
35
+ const bind = bindFormState (
36
+ ( ) => CustomizationService . state . toObject ( ) as CustomizationState ,
37
+ ( newSettings : CustomizationState ) => CustomizationService . setSettings ( newSettings as any ) ,
38
+ ) ;
47
39
48
40
const {
49
41
compactView,
0 commit comments