Improve delete UX and prepaid credit time display.

Show minutes and local expiry for resource credits; add shared delete hook with row/card loading overlays, detail-page deleting modal, and disabled controls to prevent double-delete.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
keyhan
2026-05-24 00:33:16 +03:30
parent 695e05f948
commit abbe821d91
15 changed files with 352 additions and 83 deletions
@@ -0,0 +1,14 @@
'use client';
import { Clock } from 'lucide-react';
export function DeleteButtonLabel({ loading, label = 'Delete' }: { loading?: boolean; label?: string }) {
if (loading) {
return (
<>
<Clock className="w-3 h-3 inline animate-spin" /> Deleting
</>
);
}
return <>{label}</>;
}