diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx index 456634c..3cad4e9 100644 --- a/src/components/Dashboard.tsx +++ b/src/components/Dashboard.tsx @@ -313,11 +313,14 @@ export function Dashboard() {
{debtList.map((debt) => (
- + { + setDebts( + debts.map((d) => (d.id === debt.id ? debt : d)) + ); + }} />
))} diff --git a/src/components/DebtCard.tsx b/src/components/DebtCard.tsx index 8b3782c..03b4f48 100644 --- a/src/components/DebtCard.tsx +++ b/src/components/DebtCard.tsx @@ -54,13 +54,10 @@ import { updateVariablesForTextChange, } from "../lib/emailVariables"; import { ManualResponseDialog } from "./ManualResponseDialog"; -import { ConversationTimeline } from "./ConversationTimeline"; interface DebtCardProps { debt: Debt; onUpdate?: () => void; // Callback to refresh data after updates - debts: Debt[]; - setDebts: (debts: Debt[]) => void; } const statusColors = { @@ -104,7 +101,7 @@ const statusLabels = { opted_out: "Opted Out", }; -export function DebtCard({ debt, onUpdate, debts, setDebts }: DebtCardProps) { +export function DebtCard({ debt, onUpdate }: DebtCardProps) { const [isApproving, setIsApproving] = useState(false); const [isRejecting, setIsRejecting] = useState(false); const [userProfile, setUserProfile] = useState(null); @@ -728,13 +725,6 @@ export function DebtCard({ debt, onUpdate, debts, setDebts }: DebtCardProps) {
)} - - { - setDebts(debts.map((d) => (d.id === debt.id ? debt : d))); - }} - /> );