fix(desktop): remove unused saving state in profile page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing
2026-02-12 16:29:26 +08:00
parent 8efc4ae5aa
commit 274651754c

View File

@@ -26,7 +26,6 @@ export default function ProfilePage() {
const { providers, current, setProvider, refresh, loading: providerLoading } = useProviderStore()
const [profileLoading, setProfileLoading] = useState(true)
const [_saving, setSaving] = useState(false)
const [name, setName] = useState('')
const [userContent, setUserContent] = useState('')
const [hasChanges, setHasChanges] = useState(false)
@@ -85,7 +84,6 @@ export default function ProfilePage() {
}
const handleSaveProfile = useCallback(async () => {
setSaving(true)
try {
await window.electronAPI.profile.updateName(name)
await window.electronAPI.profile.updateUser(userContent)
@@ -96,8 +94,6 @@ export default function ProfilePage() {
} catch (err) {
console.error('Failed to save profile:', err)
toast.error('Failed to save profile')
} finally {
setSaving(false)
}
}, [name, userContent])