@@ -2,10 +2,12 @@ import "./style.less";
2
2
3
3
import React , { useContext , useEffect , useState } from "react" ;
4
4
import { Checkbox , Input , message , Radio , RadioChangeEvent } from "antd" ;
5
- import { UserSettingLayoutContainer } from "../UserSettingLayoutContainer" ;
6
- import { ipcSyncByApp , ipcAsyncByApp } from "../../../utils/ipc" ;
5
+ import { observer } from "mobx-react-lite" ;
7
6
import { useTranslation } from "react-i18next" ;
8
7
import { AppearancePicker , FlatPrefersColorScheme } from "flat-components" ;
8
+
9
+ import { UserSettingLayoutContainer } from "../UserSettingLayoutContainer" ;
10
+ import { ipcSyncByApp , ipcAsyncByApp } from "../../../utils/ipc" ;
9
11
import { ConfigStoreContext , GlobalStoreContext } from "../../../components/StoreProvider" ;
10
12
import { useSafePromise } from "../../../utils/hooks/lifecycle" ;
11
13
import { loginCheck , rename } from "../../../api-middleware/flatServer" ;
@@ -19,7 +21,7 @@ enum SelectLanguage {
19
21
English ,
20
22
}
21
23
22
- export const GeneralSettingPage = ( ) : React . ReactElement => {
24
+ export const GeneralSettingPage = observer ( function GeneralSettingPage ( ) {
23
25
const sp = useSafePromise ( ) ;
24
26
const { t, i18n } = useTranslation ( ) ;
25
27
const [ openAtLogin , setOpenAtLogin ] = useState ( false ) ;
@@ -99,7 +101,11 @@ export const GeneralSettingPage = (): React.ReactElement => {
99
101
< ConfirmButtons onConfirm = { changeUserName } />
100
102
</ div >
101
103
< div className = "general-setting-binding-methods" >
102
- < BindingWeChat isBind = { bindings . wechat } onRefresh = { refreshBindings } />
104
+ < BindingWeChat
105
+ globalStore = { globalStore }
106
+ isBind = { bindings . wechat }
107
+ onRefresh = { refreshBindings }
108
+ />
103
109
</ div >
104
110
</ div >
105
111
< div className = "general-setting-checkbox" >
@@ -137,4 +143,4 @@ export const GeneralSettingPage = (): React.ReactElement => {
137
143
</ div >
138
144
</ UserSettingLayoutContainer >
139
145
) ;
140
- } ;
146
+ } ) ;
0 commit comments