feat: 1.统一右侧抽屉关闭按钮布局 2.统一 UI 组件为 Ant Design 移除 radix-ui、floating-ui 组件 3. 修复 ESLint 文件格式错误的问题
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@@ -123,7 +124,7 @@ const PersonalSetting = () => {
|
||||
recordIpLog: false,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const onMount = useEffectEvent(() => {
|
||||
let saved = localStorage.getItem('status');
|
||||
if (saved) {
|
||||
const parsed = JSON.parse(saved);
|
||||
@@ -161,7 +162,8 @@ const PersonalSetting = () => {
|
||||
isPasskeySupported()
|
||||
.then(setPasskeySupported)
|
||||
.catch(() => setPasskeySupported(false));
|
||||
}, []);
|
||||
});
|
||||
useEffect(() => onMount(), [onMount]);
|
||||
|
||||
useEffect(() => {
|
||||
let countdownInterval = null;
|
||||
@@ -176,7 +178,7 @@ const PersonalSetting = () => {
|
||||
return () => clearInterval(countdownInterval);
|
||||
}, [disableButton, countdown]);
|
||||
|
||||
useEffect(() => {
|
||||
const onScopeChange2 = useEffectEvent(() => {
|
||||
if (userState?.user?.setting) {
|
||||
const settings = parseUserSetting(userState.user.setting);
|
||||
setNotificationSettings({
|
||||
@@ -214,7 +216,11 @@ const PersonalSetting = () => {
|
||||
prev.avatarPreset || getDefaultAvatarPresetId(userState.user),
|
||||
}));
|
||||
}
|
||||
}, [userState?.user?.id, userState?.user?.setting]);
|
||||
});
|
||||
useEffect(
|
||||
() => onScopeChange2(),
|
||||
[onScopeChange2, userState?.user?.id, userState?.user?.setting],
|
||||
);
|
||||
|
||||
const handleInputChange = (name, value) => {
|
||||
setInputs((inputs) => ({ ...inputs, [name]: value }));
|
||||
|
||||
Reference in New Issue
Block a user