feat(subscription): AnnouncementCard에 district + 5티어 뱃지
This commit is contained in:
@@ -41,7 +41,6 @@ const DEFAULT_PROFILE = {
|
|||||||
// ── 유틸 ──────────────────────────────────────────────────────────────────────
|
// ── 유틸 ──────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
// 매칭 reasons에서 자치구 티어를 추출 ("자치구 S티어: 강남구 (+25)" → "S")
|
// 매칭 reasons에서 자치구 티어를 추출 ("자치구 S티어: 강남구 (+25)" → "S")
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
function extractTier(reasons) {
|
function extractTier(reasons) {
|
||||||
for (const r of reasons || []) {
|
for (const r of reasons || []) {
|
||||||
const m = r.match(/자치구 ([SABCD])티어/);
|
const m = r.match(/자치구 ([SABCD])티어/);
|
||||||
@@ -358,6 +357,17 @@ function AnnouncementCard({ item, isSelected, onClick, onBookmark }) {
|
|||||||
{item.match_score}점
|
{item.match_score}점
|
||||||
</span>
|
</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>
|
</div>
|
||||||
<button
|
<button
|
||||||
onClick={(e) => { e.stopPropagation(); onBookmark?.(item.id); }}
|
onClick={(e) => { e.stopPropagation(); onBookmark?.(item.id); }}
|
||||||
|
|||||||
Reference in New Issue
Block a user