feat(subscription): AnnouncementCard에 district + 5티어 뱃지

This commit is contained in:
2026-04-28 11:06:32 +09:00
parent f6e78ac0ca
commit 0a0ab05e41

View File

@@ -41,7 +41,6 @@ const DEFAULT_PROFILE = {
// ── 유틸 ──────────────────────────────────────────────────────────────────────
// 매칭 reasons에서 자치구 티어를 추출 ("자치구 S티어: 강남구 (+25)" → "S")
// eslint-disable-next-line no-unused-vars
function extractTier(reasons) {
for (const r of reasons || []) {
const m = r.match(/자치구 ([SABCD])티어/);
@@ -358,6 +357,17 @@ function AnnouncementCard({ item, isSelected, onClick, onBookmark }) {
{item.match_score}
</span>
)}
{item.district && (
<span className="sub-chip sub-chip--district">{item.district}</span>
)}
{(() => {
const tier = extractTier(item.match_reasons);
return tier ? (
<span className={`sub-chip sub-chip--tier sub-chip--tier-${tier}`}>
{tier}티어
</span>
) : null;
})()}
</div>
<button
onClick={(e) => { e.stopPropagation(); onBookmark?.(item.id); }}