@@ -7,19 +7,16 @@ import BaseSetting from './BaseSetting';
77import AISetting from './AiSetting' ;
88import ProxySetting from './ProxySetting' ;
99import About from './About' ;
10- import { IAiConfig } from '@/typings' ;
1110import styles from './index.less' ;
1211import { ILatestVersion } from '@/service/config' ;
1312import UpdateDetection , { IUpdateDetectionRef , UpdatedStatusEnum } from '@/blocks/Setting/UpdateDetection' ;
1413
1514// ---- store -----
16- import { useSettingStore , getAiSystemConfig , setAiSystemConfig } from '@/store/setting'
15+ import { useSettingStore , getAiSystemConfig , setAiSystemConfig } from '@/store/setting' ;
1716
1817interface IProps {
19- aiConfig : IAiConfig ;
2018 className ?: string ;
2119 render ?: ReactNode ;
22- dispatch : ( params : any ) => void ;
2320 noLogin ?: boolean ; // 用于在没有登录的页面使用,不显示ai设置等需要登录的功能
2421 defaultArouse ?: boolean ; // 是否默认弹出
2522 defaultMenu ?: number ; // 默认选中的菜单
@@ -35,7 +32,7 @@ function Setting(props: IProps) {
3532 const [ currentMenu , setCurrentMenu ] = useState < number > ( defaultMenu ) ;
3633 const [ updateDetectionData , setUpdateDetectionData ] = useState < IUpdateDetectionData | null > ( null ) ;
3734 const updateDetectionRef = React . useRef < IUpdateDetectionRef > ( null ) ;
38- const aiConfig = useSettingStore ( state => state . aiConfig ) ;
35+ const aiConfig = useSettingStore ( ( state ) => state . aiConfig ) ;
3936
4037 useEffect ( ( ) => {
4138 if ( defaultArouse ) {
@@ -166,9 +163,4 @@ function Setting(props: IProps) {
166163 ) ;
167164}
168165
169- // export default connect(({ ai }: { ai: IAIState }) => ({
170- // aiConfig: ai.aiConfig,
171- // }))();
172-
173166export default Setting ;
174-
0 commit comments