refactor: 修改依赖项

This commit is contained in:
Gavan
2025-07-14 14:50:14 +08:00
parent bede408e41
commit 586372f4c5
3 changed files with 12 additions and 6 deletions

View File

@@ -178,8 +178,10 @@ const AuthPage = () => {
}, []);
const oauthEnable = useMemo(() => {
return custom_oauth.enable || dingtalk_oauth.enable;
}, [custom_oauth, dingtalk_oauth]);
return (
loginSetting.custom_oauth?.enable || loginSetting.dingtalk_oauth?.enable
);
}, [loginSetting]);
// 渲染用户名输入框
const renderUsernameField = () => (

View File

@@ -148,8 +148,10 @@ const Invite = () => {
};
const oauthEnable = useMemo(() => {
return custom_oauth.enable || dingtalk_oauth.enable;
}, [custom_oauth, dingtalk_oauth]);
return (
loginSetting.custom_oauth?.enable || loginSetting.dingtalk_oauth?.enable
);
}, [loginSetting]);
const oauthLogin = () => {
return (

View File

@@ -169,8 +169,10 @@ const UserLogin = () => {
}, []);
const oauthEnable = useMemo(() => {
return custom_oauth.enable || dingtalk_oauth.enable;
}, [custom_oauth, dingtalk_oauth]);
return (
loginSetting.custom_oauth?.enable || loginSetting.dingtalk_oauth?.enable
);
}, [loginSetting]);
// 渲染用户名输入框
const renderUsernameField = () => (