From be46da0a1fdf371541103331a4dc1fe1a70f15ec Mon Sep 17 00:00:00 2001 From: gahusb Date: Mon, 13 Apr 2026 04:14:50 +0900 Subject: [PATCH] =?UTF-8?q?feat(subscription):=20=EC=A2=85=EB=A3=8C=20?= =?UTF-8?q?=EC=B2=AD=EC=95=BD=20=EC=9D=BC=EA=B4=84=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AnnouncementsTab ํˆด๋ฐ”์— '๐Ÿ—‘ ์ข…๋ฃŒ ์ฒญ์•ฝ ์‚ญ์ œ' ๋ฒ„ํŠผ ์ถ”๊ฐ€. ํ™•์ธ ๋‹ค์ด์–ผ๋กœ๊ทธ โ†’ DELETE /api/realestate/announcements/closed ํ˜ธ์ถœ โ†’ ์‚ญ์ œ ๊ฑด์ˆ˜ ์•Œ๋ฆผ ํ›„ ๋ชฉ๋ก ์ƒˆ๋กœ๊ณ ์นจ. Co-Authored-By: Claude Opus 4.6 --- src/pages/subscription/Subscription.jsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 }} /> +