diff --git a/src/pages/subscription/Subscription.jsx b/src/pages/subscription/Subscription.jsx index 5aedf87..3179ac6 100644 --- a/src/pages/subscription/Subscription.jsx +++ b/src/pages/subscription/Subscription.jsx @@ -636,6 +636,19 @@ function AnnouncementsTab() { } }; + const handleDeleteClosed = async () => { + if (!confirm('종료된(완료) 청약 공고를 모두 삭제할까요?')) return; + try { + const res = await apiDelete('/api/realestate/announcements/closed'); + alert(`${res.deleted || 0}건 삭제되었습니다.`); + setPage(1); + load(); + } catch (e) { + console.error('Delete closed error:', e); + alert('삭제 실패'); + } + }; + const handleBookmark = async (id) => { try { const updated = await apiPatch(`/api/realestate/announcements/${id}/bookmark`); @@ -680,6 +693,14 @@ function AnnouncementsTab() { onChange={(e) => { setRegionFilter(e.target.value); setPage(1); }} style={{ width: 160, padding: '6px 12px', fontSize: 12 }} /> +