linting, tenant slug -> name
This commit is contained in:
@@ -38,10 +38,11 @@ function CorrespondentsPanel({
|
||||
try {
|
||||
await onUpdate(editingId, { name: trimmed });
|
||||
cancelEdit();
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
onNotify?.('Failed to update correspondent.', 'error');
|
||||
console.error('[correspondents] update failed', error);
|
||||
setSaving(false);
|
||||
}
|
||||
}, [editingId, draftName, onUpdate, cancelEdit, onNotify]);
|
||||
|
||||
const handleDelete = useCallback(
|
||||
@@ -53,16 +54,14 @@ function CorrespondentsPanel({
|
||||
if (editingId === correspondent.id) {
|
||||
cancelEdit();
|
||||
}
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {
|
||||
return;
|
||||
} catch (error) {
|
||||
onNotify?.('Failed to delete correspondent.', 'error');
|
||||
console.error('[correspondents] delete failed', error);
|
||||
} finally {
|
||||
setDeletingId(null);
|
||||
}
|
||||
},
|
||||
[onDelete, editingId, cancelEdit],
|
||||
[onDelete, editingId, cancelEdit, onNotify],
|
||||
);
|
||||
|
||||
const handleCreate = useCallback(
|
||||
@@ -77,11 +76,9 @@ function CorrespondentsPanel({
|
||||
try {
|
||||
await onCreate({ name: trimmed });
|
||||
setCreateName('');
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {
|
||||
return;
|
||||
} catch (error) {
|
||||
onNotify?.('Failed to create correspondent.', 'error');
|
||||
console.error('[correspondents] create failed', error);
|
||||
} finally {
|
||||
setCreating(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user