fix(frontend): remove duplicate credential handler functions in settings page
This commit is contained in:
parent
895974878d
commit
18727f8c99
1 changed files with 0 additions and 22 deletions
|
|
@ -92,29 +92,7 @@ export default function SettingsPage() {
|
|||
}
|
||||
}
|
||||
|
||||
const handleOpenCredentialDialog = (serviceName: string) => {
|
||||
setSelectedService(serviceName)
|
||||
setCredentialPayload("")
|
||||
setShowPassword(false)
|
||||
setIsDialogOpen(true)
|
||||
}
|
||||
|
||||
const handleSaveCredential = async () => {
|
||||
if (!selectedService || !credentialPayload) return
|
||||
|
||||
setSaving(true)
|
||||
try {
|
||||
await credentialsApi.save(selectedService, credentialPayload)
|
||||
toast.success(`Credentials for ${selectedService} saved`)
|
||||
setIsDialogOpen(false)
|
||||
fetchCredentials() // Refresh list
|
||||
} catch (error) {
|
||||
console.error("Failed to save credential", error)
|
||||
toast.error("Failed to save credential")
|
||||
} finally {
|
||||
setSaving(false)
|
||||
}
|
||||
}
|
||||
|
||||
const handleDeleteCredential = async (serviceName: string) => {
|
||||
if (!confirm(`Are you sure you want to remove credentials for ${serviceName}?`)) return
|
||||
|
|
|
|||
Loading…
Reference in a new issue