diff --git a/frontend/src/pages/Library.tsx b/frontend/src/pages/Library.tsx index 1f8c876..63f4638 100644 --- a/frontend/src/pages/Library.tsx +++ b/frontend/src/pages/Library.tsx @@ -42,7 +42,7 @@ export default function Library() { if (!old || !old.podcasts) return old; // Optimistically filter by subscriptionId or _id as fallback const filtered = old.podcasts.filter((p: any) => - String(p.subscriptionId || p._id) !== String(id) + String(p.subscriptionId || p._id) !== String(podcastId) ); return { ...old, podcasts: filtered, count: filtered.length }; } @@ -208,7 +208,7 @@ export default function Library() { {/* Unsubscribe button */} - {confirmDeleteId === podcast._id ? ( + {confirmDeleteId === (podcast.subscriptionId || podcast._id) ? (