diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx
index 3cad4e9..456634c 100644
--- a/src/components/Dashboard.tsx
+++ b/src/components/Dashboard.tsx
@@ -313,14 +313,11 @@ export function Dashboard() {
{debtList.map((debt) => (
-
- {
- setDebts(
- debts.map((d) => (d.id === debt.id ? debt : d))
- );
- }}
+ onUpdate={fetchDebts}
+ debts={debts}
+ setDebts={setDebts}
/>
))}
diff --git a/src/components/DebtCard.tsx b/src/components/DebtCard.tsx
index 9c98065..0d560ad 100644
--- a/src/components/DebtCard.tsx
+++ b/src/components/DebtCard.tsx
@@ -54,10 +54,13 @@ 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 = {
@@ -101,7 +104,7 @@ const statusLabels = {
opted_out: "Opted Out",
};
-export function DebtCard({ debt, onUpdate }: DebtCardProps) {
+export function DebtCard({ debt, onUpdate, debts, setDebts }: DebtCardProps) {
const [isApproving, setIsApproving] = useState(false);
const [isRejecting, setIsRejecting] = useState(false);
const [userProfile, setUserProfile] = useState
(null);
@@ -725,6 +728,13 @@ export function DebtCard({ debt, onUpdate }: DebtCardProps) {
)}
+
+